Remastersys and AVLinux Forum
May 24, 2013, 03:06:38 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Remastersys depends on user donations to survive.  Please help keep Remastersys going.

http://www.remastersys.com
 
   Home   Remastersys Home Remastersys downloads Donate Login Register AV LINUX Home Help Search  
Pages: [1] 2 3 4
  Print  
Author Topic: New packages for Ubuntu to test out before final release - 3.0.2-1  (Read 11235 times)
0 Members and 1 Guest are viewing this topic.
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« on: April 06, 2012, 08:53:34 PM »

Attached are the 2 packages needed for remastersys starting with version 3.0.2-1.

I have split off the gui and had to abandon the new gui I created.  Back to the remastersys-gtk gui due to issue in 64-bit.

Code cleanup and fixes for Ubuntu 12.04.


Please try it out and post feedback in this thread.

I just uploaded and base package due to a new feature(bug) introduced by Ubuntu where the live user gets replaced by the Flavour name of the distro which meant it got named the first word of the live cd name.

I have corrected the issue with 64-bit.  I had to create a package compiled on 64-bit and it works.  Please try the new gui packages out as they will become the default gui for 3.0.2 and I need them tested.

If you are interested in helping with translating the gui to your native language, please email me and let me know what language you would like to translate it to and I will send you the translation file that you can put your translation in and then we can add it to the package.

If you prefer the direct download, I also have the packages here - http://www.remastersys.com/downloads



[attachment deleted by admin]
« Last Edit: April 14, 2012, 12:27:53 AM by fragadelic » Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #1 on: April 07, 2012, 07:42:46 PM »

I just made a small fix to the remastersys-gui package.  If you have downloaded it prior to reading this please download that package again now.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
tbruff13
Jr. Member
**
Offline Offline

Posts: 19


« Reply #2 on: April 07, 2012, 09:04:19 PM »

Should I use this package to remastersys for my Kubuntu 12.04 Senior Project.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #3 on: April 07, 2012, 09:08:31 PM »

This is the only version that officially supports 12.04.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
tbruff13
Jr. Member
**
Offline Offline

Posts: 19


« Reply #4 on: April 07, 2012, 09:54:36 PM »

Hey It is tbruff13, and I am a student that is doing his senior project on Kubuntu 12.04. I am so grateful to you for all of your help, and If I had any money to give I would. Anyway because I am presenting this to a parish full of teachers I need your premission to use this software for my presentation. I does not have to be official I just has to exist. Thank You So Much Yahoo Yahoo Yahoo Yahoo Yahoo
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #5 on: April 07, 2012, 10:12:42 PM »

That is the beauty of the GPL - you can do as you please as long as you keep the copyright information there.  Hopefully it works out for you as expected.  I'm not sure what kind of permission you would need from me though.  Are your teachers asking you to get permission?  What exactly is your presentation on?
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #6 on: April 08, 2012, 11:48:25 AM »

I'm testing Remastersys  3.0.2-1 in Lubuntu 12.04 and it still wants to install 213 addidional packages. Why?
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #7 on: April 08, 2012, 12:00:01 PM »

You need to install the base remastersys package first.  If that is what you did then  try installing ubiquity-frontend-debconf first and then the remastersys packages.  Ubuntu changed the dependencies for ubiquity for 12.04 and this is the cause.  If the way I have the dependencies won't work then there is nothing I can do to fix it as the deps are set by ubiquity.  The only solution moving forward would be to install ubiquity-frontend-debconf first.

I might try removing ubiquity and seeing if just having ubiquity-frontend-debconf corrects it.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #8 on: April 08, 2012, 12:00:45 PM »

I'm testing Remastersys  3.0.2-1 in Lubuntu 12.04 and it still wants to install 213 addidional packages. Why?

Please post what packages are trying to be installed so I am sure the problem is due to the new ubiquity dependencies.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #9 on: April 08, 2012, 12:51:17 PM »

I allready tested to install ubiquity-frontend-debconf first and then remastersys needed only 38 extra packages (+ gui 1 more).
Maybe I can post later list of those packages which it wanted without ubiquity-frontend-debconf.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #10 on: April 08, 2012, 01:05:59 PM »

Try the new package.  I removed ubiquity as a dep and left just ubiquity-frontend-debconf and it looks like it works properly now.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #11 on: April 08, 2012, 02:22:18 PM »

Seems to be OK now, newest remastersys installed only 52 + 1 packages.

I noticed some other problem:
I installed Lubuntu 12.04 with user "esko". When I made a distribution iso, I tried to change Live user "custom" to "esko", but that does not seem to work. When booted (from usb), Lubuntu asked me to log in as "vieras" (=guest), but anyhow wanted to know (empty) password of custom, when I started synaptic. Home folder was also some strange /tmp/guest-lsRfLP?

I'll test again with backup option, if it works better.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #12 on: April 08, 2012, 02:36:55 PM »

That happens when you don't have the proper session set as the default for lightdm.

Either that or you set autologin on the original system to a specific user.  Check your /etc/lightdm.conf.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #13 on: April 08, 2012, 02:51:20 PM »

My /etc/lightdm/lightdm.conf is like this:

Code:
[SeatDefaults]
autologin-guest=false
autologin-user=esko
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #14 on: April 08, 2012, 02:54:46 PM »

That is your problem.

I have always said that if you are making a dist, you cannot use autologin.  Casper, the ubuntu live tools, fail to modify the file properly based on how they wrote it so it must be clean to begin with.  This is not an issue with remastersys but rather with how you set your system up and the fact that casper can't account for it.

If you remove all the autologin stuff the live user auto login will work fine.

I'm typing this from a 12.04 remaster with lxde and lightdm so I know it works.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
RevLinux
Administrator
Hero Member
*****
Offline Offline

Posts: 219


Ridin' the bit stream.... Cowabunga!


WWW
« Reply #15 on: April 08, 2012, 11:23:12 PM »

I just removed the older Remastersys and installed this version.
My system already had ubiquity-frontend-debconf installed because Remastersys kept getting uninstalled after every remaster when I moved to the Ubuntu 12.04 core.
I was not prompted to install anything beyond my installation of the two files posted at the bottom of this thread.

On thing to note:
When I installed ubiquity-frontend-debconf, I was prompted to install a bunch of files for which I was fine with at the time.
I plan to make remaster  RevLinuxOS 2.0 Alpha-3.01 late tonight, and I'll post back with results. Smile
Logged

Join the Linux Revolution!
http://www.revlinuxos.com
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #16 on: April 09, 2012, 12:10:20 AM »

I fixed the dep issue.  I only put ubiquity-frontend-debconf as the dependency which pulls in ubiquity without the other frontends.

I completely removed remastersys here along with all the live stuff and tried the install from the beginning and now it works as it should.  The files I uploaded earlier have the fix in it.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #17 on: April 09, 2012, 07:49:59 AM »

That is your problem.

I have always said that if you are making a dist, you cannot use autologin.  Casper, the ubuntu live tools, fail to modify the file properly based on how they wrote it so it must be clean to begin with.  This is not an issue with remastersys but rather with how you set your system up and the fact that casper can't account for it.

If you remove all the autologin stuff the live user auto login will work fine.

I'm typing this from a 12.04 remaster with lxde and lightdm so I know it works.
Yes, everything is always users problem.

I can use autologin with Lubuntu 12.04 and make working remastersys distro, but only if both users have name "custom".

Maybe it has  something to do with lightdm, because with earlier distros I have used (Bodhi and Peppermint Two) I can use whichever name I want for autologin and remastersys Live user name.

For me problem solved: I use "custom" as default (and autologin) user and everything works with remastersys.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #18 on: April 09, 2012, 08:16:51 AM »

It has nothing to do with lightdm.

It is Ubuntu's casper and the way they change those files on live boot.  If autologin is set, their casper script fails to change it.  If you want to change that, then you need to fork casper and make your own changes.  If you want to use the standard Ubuntu casper scripts for your live then you must work within the boundaries set by the scripts.  I'm just trying to tell you how to make a successful remaster based on my in depth knowledge of casper and ubiquity.  Whether you choose to listen or not is up to you but it doesn't change the facts and the simple fact is that if you have autologin set it will fail to fully setup the live user.

This will also be a problem after install as it will copy the original lightdm.conf file and that tries to autologin your user you set.  Again, I'm just trying to tell you how to make a successful remaster using the Ubuntu tools properly.

If you want to make a proper dist, you need to keep it as generic as possible and make sure your system doesn't conflict with casper and ubiquity.  Your way conflicts with casper and ubiquity and WILL cause you problems.

I've spent a long time looking at each and every casper startup script in every version of Ubuntu and I can make those changes for the user but I choose not to since my goal has always been to make the least amount of changes to the users system.  Enough people that are ignorant to the way the live works already accuse remastersys of making changes on their system but if you look closely at what it does, I stay away from changing the installed system unless the user specifies(grub background, plymouth theme,etc).

And yes I guess it is the users fault if they don't heed my advice on how to make a successful remaster.  I want you to succeed.  This is why I released remastersys and keep releasing it to the public.  I want everyone to be able to create their own custom flavour or to be able to backup their system.  I don't want you to fail which is why you should try and take my advice on the issues.  Sometimes I may come off a bit rough but it is because my time is limited so I just answer as quickly as possible to try to get people on their way to a successful remaster as quickly as possible.  I believe the only people who know casper and ubiquity better than me are the actual ubuntu developers that create and maintain them.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #19 on: April 09, 2012, 08:51:13 AM »

As I said :
"For me problem solved: I use "custom" as default (and autologin) user and everything works with remastersys."

This IS the way that has worked years for me with many Ubuntu versions - I allways use autologin. I can use autologin with installed distro and Live user for remastersys distro - but only if both users are "custom".

I was only a little bit curious, why Lubuntu 12.04 works another way than Peppermint and Bodhi, where I can use any name.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #20 on: April 09, 2012, 09:11:25 AM »

Please take a look at the casper scripts before you claim your method is correct.  According to the casper scripts your method will fail and it is failing.  Do as you please but please do not accuse remastersys of not working properly when you aren't willing to set your system up properly for casper and ubiquity to work without error.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #21 on: April 09, 2012, 08:07:20 PM »

ourasi - here is the script in /usr/share/initramfs-tools/scripts/casper-bottom/15autologin that is responsible for setting up the autologin on the live.

I normally don't care if folks believe me as it is because they don't know but I've had to explain this far too many times so here is Ubuntu's script that modifies the login managers for autologin.

Code:
#!/bin/sh

PREREQ=""
DESCRIPTION="Setting up automatic login..."

prereqs()
{
       echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
       prereqs
       exit 0
       ;;
esac

. /scripts/casper-functions

log_begin_msg "$DESCRIPTION"

if [ -d /root/etc/gdm ]; then
    # Configure GDM autologin
    GDMCustomFile=/root/etc/gdm/custom.conf
    AutologinParameters="AutomaticLoginEnable=true\n\
AutomaticLogin=$USERNAME\n\
TimedLoginEnable=true\n\
TimedLogin=$USERNAME\n\
TimedLoginDelay=10"

    # Prevent from updating if parameters already present (persistent usb key)
    if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then
        if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then
            echo '[daemon]' >> $GDMCustomFile
        fi
        sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile
        printf "[com.canonical.indicator.session]\nsuppress-logout-menuitem=true\n" >> /root/usr/share/glib-2.0/schemas/casper.gschema.override
        chroot /root glib-compile-schemas /usr/share/glib-2.0/schemas/
    fi
fi

if [ -f /root/etc/kde4/kdm/kdmrc ]; then
    # Configure KDM autologin
    sed -i -r \
        -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
        -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
        -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
        /root/etc/kde4/kdm/kdmrc
fi

if [ -f /root/etc/lxdm/lxdm.conf ]; then
    # Configure LXDM autologin with LXDE session
   sed -i -r \
        -e "s/^# autologin=dgod/autologin=$USERNAME/" \
        -e "s/^# session/session/" \
        -e "s/startlxde/startlubuntu/" \
        /root/etc/lxdm/lxdm.conf
fi

if [ -f /root/etc/xdg/lubuntu/lxdm/lxdm.conf ]; then
    # Configure LXDM autologin with Lubuntu session
   sed -i -r \
        -e "s/^# autologin=dgod/autologin=$USERNAME/" \
        -e "s/^# session/session/" \
        -e "s/startlxde/startlubuntu/" \
        /root/etc/xdg/lubuntu/lxdm/lxdm.conf
fi

if [ -d /root/etc/lightdm ]; then
    # Configure LightDM autologin
    LightDMCustomFile=/root/etc/lightdm/lightdm.conf
    AutologinParameters="allow-guest=false\n\
autologin-guest=false\n\
autologin-user=$USERNAME\n\
autologin-user-timeout=0\n\
autologin-session=lightdm-autologin"

    # Prevent from updating if parameters already present (persistent usb key)
    if ! `grep -qs '^autologin-user' $LightDMCustomFile` ; then
        if ! `grep -qs '\[SeatDefaults\]' $LightDMCustomFile` ; then
            echo '[SeatDefaults]' >> $LightDMCustomFile
        fi
        sed -i "s/\[SeatDefaults\]/\[SeatDefaults\]\n$AutologinParameters/" $LightDMCustomFile
    fi

    # LightDM on kubuntu-active wants to start ubuntu.desktop, workaround here for now jriddell 2012-03-15
    if [ -e /root/usr/share/xsessions/plasma-active.desktop ]; then
        cp /root/usr/share/xsessions/plasma-active.desktop /root/usr/share/xsessions/ubuntu.desktop
    fi
fi

log_end_msg

You will notice for each one that if it finds the autologin already enabled it does nothing because it thinks you have persistent setup on usb.  I will not change remastersys to mess with your system  It is up to you to set it up properly if you want to create a dist mode iso.  For backup mode it doesn't matter as I disable user creation on the live anyway so it leaves however you have it setup.

You can think what you want but there is the proof for you to see in case you didn't know where to find it.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #22 on: April 10, 2012, 07:05:57 AM »

You can think what you want but there is the proof for you to see in case you didn't know where to find it.

This is another proof what maybe happens:

1. I made xubuntu installation with user "ourasi" and used autologin (as allways)

2. Changed /etc/remastersys.conf to
Code:
#Remastersys Global Configuration File
WORKDIR="/home/remastersys"
EXCLUDES=""
LIVEUSER="ourasi"
LIVECDLABEL="Labelname Live CD"
CUSTOMISO="isoname-$1.iso"
SQUASHFSOPTS="-no-recovery -always-use-fragments -b 1M -no-duplicates"
BACKUPSHOWINSTALL="1"
LIVECDURL="http://www.remastersys.com"
(remastersys-gui doesn't work in Xubuntu 12.04, at least 64-bit latest version)

Remastersys created this /etc/casper.conf:

Code:
# This file should go in /etc/casper.conf
# Supported variables are:
# USERNAME, USERFULLNAME, HOST, BUILD_SYSTEM

export USERNAME="labelname"
export USERFULLNAME="Live session user"
export HOST="labelname"
export BUILD_SYSTEM="Ubuntu"

Maybe you can see, that remastersys parses username from Live-CD:n labelname? Casper then makes home folder "labelname", but can't make user.

Liveuser*) and label must be same, like this:
Code:
LIVEUSER="ourasi"
LIVECDLABEL="Ourasi Live CD"
or this:
Code:
LIVEUSER="esko"
LIVECDLABEL="Esko Live CD"

*)EDIT: Of course liveuser must be the same as autologin user in installed system.
« Last Edit: April 10, 2012, 07:16:49 AM by ourasi » Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #23 on: April 10, 2012, 07:21:45 AM »

Ourasi - do not set autologin on the system you want to remaster.  That is completely wrong.  Just because it works sometimes for you doesn't mean it is the right way to do it.

Remastersys works in 32-bit Xubuntu cause that is what the gui was developed on.  I don't have any 64-bit installs as I only have 1 PC that is 64 bit capable and don't use it often.

Take some screenshots of the config file setting page and post them.  Save the settings and then go back in and post another screenshot.

BTW, if you had listened and removed autologin, it would have worked even with the unintended live username.  The config file issue won't stop it from working properly - the fact that you insist on setting autologin on your system is your problem. In the meantime, jsut edit the config manually and run the dist from the gui.

How hard is it to type in your password on the system you are using as the base for your distro?

I don't understand why you continue to leave autologin set when I've shown you exactly how Ubuntu sets the live user up?????

I want to correct the 64-bit config file issue but your user autlogin issue is not an issue at all - it is a problem created by you.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #24 on: April 10, 2012, 11:21:02 AM »

Can you explain this:



Why do you take LIVECDLABEL and use that as USERNAME for casper?

Same thing happens even if I don't use autologin. Only if LIVEUSER and LIVECDLABEL's first word are the same, remastersys creates right casper.conf from which casper can make prober user name and home folder for Live system.

I'm quite tired listening your accusations, that everything is always my (or other users) fault. I have made hundreds of remastered isos and it is totally my business how I use remastersys. I only want it behave logically.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #25 on: April 10, 2012, 11:28:29 AM »

This is why I asked you for screenshots.  If you don't provide me with screenshots I can't help.

As for the user issue, it has nothing to do with remastersys.  You are going against how Ubuntu's casper scripts try to setup the user for the live.  This is your problem and not remastersys' problem.  I'm trying to tell you how to make a successful remaster and you keep fighting me on it.  Do as you please.

If you are not willing to provide screenshots of the config issue I can't help.  It works perfectly fine on the 32-bit version and my development pc is only 32 bit so I can't even install 64 bit to test which is why I rely on folks such as yourself to provide me with feedback.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #26 on: April 10, 2012, 11:52:58 AM »

Look ourasi, arguing about methods is pointless.  Your way works as long as you use the same username for live that you set in the login manager for autologin but it isn't ideal or the way the Ubuntu developers intended it to work.

I want to correct the issue with 64-bit and need the feedback so I can go back to the developer of BaCon and discuss the results with him.  For that to happen I need the screenshots I asked you for - namely, a screenshot of your settings on the config page of remastersys, then click on save and go back in.  Provide another screenshot of the config screen again.  If you aren't willing to do so then that is fine but someone else that uses 64-bit and has the same issue needs to do it for me.

Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #27 on: April 10, 2012, 12:03:23 PM »

For those interested, here is the bacon code for the gui.

Code:
REM Copyright 2012 Tony Brijeski <tb6517@yahoo.com>
REM Gui frontend to remastersys using gtk
REM
REM Code Snippets and help from Pjot and vovchik from the Bacon Forum
REM

IMPORT "vte_terminal_new" FROM "libvte.so.9" TYPE long
IMPORT "vte_terminal_reset(long,int,int)" FROM "libvte.so.9" TYPE void
IMPORT "vte_terminal_fork_command(long,char*,char**,char**,char*,int,int,int)" FROM "libvte.so.9" TYPE int
IMPORT "vte_terminal_get_child_exit_status(long)" FROM "libvte.so.9" TYPE int

INCLUDE "/usr/lib/bacon/hug.bac"

OPTION INTERNATIONAL TRUE
SETENVIRON "OUTPUT_CHARSET", "UTF-8"

INIT

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Variable declarations
screenwidth = 1300
screenheight = 1000
dialogwidth = 400
dialogheight = 100
buttonheight = 30
windowwidth = screenwidth / 2
windowheight = screenheight / 2
framewidth = windowwidth - 10
buttonwidth = framewidth / 4
frameheight = windowheight - buttonheight * 2 - 140
frameleftmargin = 5
frametopmargin = 150
cola = 0 * framewidth / 4 + 10
colb = 1 * framewidth / 4 + 30
colc = 2 * framewidth / 4 + 50
cla = 0 * framewidth / 4 + 5
clb = 1 * framewidth / 4 + 5
clc = 2 * framewidth / 4 + 5
cld = 3 * framewidth / 4 + 5
rowa = 1 * frameheight / 6 + frametopmargin - buttonheight / 2
rowb = 2 * frameheight / 6 + frametopmargin - buttonheight / 2
rowc = 3 * frameheight / 6 + frametopmargin - buttonheight / 2
rowd = 4 * frameheight / 6 + frametopmargin - buttonheight / 2
rowe = 5 * frameheight / 6 + frametopmargin - buttonheight / 2
rwa = 1 * frameheight / 9 + frametopmargin - buttonheight / 2
rwb = 2 * frameheight / 9 + frametopmargin - buttonheight / 2
rwc = 3 * frameheight / 9 + frametopmargin - buttonheight / 2
rwd = 4 * frameheight / 9 + frametopmargin - buttonheight / 2
rwe = 5 * frameheight / 9 + frametopmargin - buttonheight / 2
rwf = 6 * frameheight / 9 + frametopmargin - buttonheight / 2
rwg = 7 * frameheight / 9 + frametopmargin - buttonheight / 2
rwh = 8 * frameheight / 9 + frametopmargin - buttonheight / 2
GLOBAL WORKDIR$, EXCLUDES$, LIVEUSER$, LIVECDLABEL$, CUSTOMISO$, SQUASHFSOPTS$, BACKUPSHOWINSTALL$, LIVECDURL$, SPLASH$, GRUB$, PLYMOUTH$, THEMENAME$, THEMEDIR$, THEMEPIC$, ULSELECT$
GLOBAL prev_window = 0

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Main Window
main_window = WINDOW("Remastersys", windowwidth, windowheight)
frame = FRAME(framewidth, frameheight)
ATTACH (main_window, frame, frameleftmargin, frametopmargin)
TEXT(frame, " Main ")
rempic = IMAGE("/usr/share/pixmaps/remastersys-gui.png",framewidth - 10,128)
ATTACH(main_window, rempic, 10,10)
backup_button = BUTTON(INTL$("Backup"), buttonwidth, buttonheight)
ATTACH(main_window,backup_button, cola,rowa)
backup_button_label = MARK(INTL$("Create a live iso backup of your system including your personal data"), buttonwidth * 3, buttonheight)
ATTACH(main_window,backup_button_label, colb,rowa)
dist_button = BUTTON(INTL$("Distribution"), buttonwidth, buttonheight)
ATTACH(main_window,dist_button, cola,rowb)
dist_button_label = MARK(INTL$("Create a live iso similar to the original one from Ubuntu"), buttonwidth * 3, buttonheight)
ATTACH(main_window,dist_button_label, colb,rowb)
config_button = BUTTON(INTL$("Customize"), buttonwidth, buttonheight)
ATTACH(main_window,config_button, cola,rowc)
config_button_label = MARK(INTL$("Customize system and remastersys settings"), buttonwidth * 3, buttonheight)
ATTACH(main_window,config_button_label, colb,rowc)
clear_button = BUTTON(INTL$("Clear Working Folder"), buttonwidth, buttonheight)
ATTACH(main_window,clear_button, cola,rowd)
clear_button_label = MARK(INTL$("Clear out the Working Folder"), buttonwidth * 3, buttonheight)
ATTACH(main_window,clear_button_label, colb,rowd)
check_button = BUTTON(INTL$("Check Log"), buttonwidth, buttonheight)
ATTACH(main_window,check_button, cola,rowe)
check_button_label = MARK(INTL$("Check the remastersys.log"), buttonwidth * 3, buttonheight)
ATTACH(main_window,check_button_label, colb,rowe)
quit_button = BUTTON(INTL$("Quit"), buttonwidth, buttonheight)
ATTACH(main_window,quit_button, windowwidth - 10 - buttonwidth , frametopmargin + frameheight + (windowheight - frametopmargin - frameheight - buttonheight) / 2)
PROPERTY(backup_button_label,"xalign",0.0)
PROPERTY(dist_button_label,"xalign",0.0)
PROPERTY(config_button_label,"xalign",0.0)
PROPERTY(clear_button_label,"xalign",0.0)
PROPERTY(check_button_label,"xalign",0.0)
prev_window = main_window

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Dialogs
error_dialog=MSGDIALOG(INTL$("Something went wrong.\nPlease check the remastersys.log"), dialogwidth, dialogheight, 3, 1)
fatal_dialog=MSGDIALOG(INTL$("Must be run as root.  Exiting."), dialogwidth, dialogheight, 3, 1)
info_dialog=MSGDIALOG(INTL$("Completed Successfully"), dialogwidth, dialogheight, 0, 1)
wait_dialog=MSGDIALOG(INTL$("Please Wait"), dialogwidth, dialogheight, 0, 0)
plymouth_pick=FILEDIALOG(INTL$("Choose a 1920x1280 png file for plymouth"),INTL$("Select"), windowwidth, windowheight, 0)
splash_pick=FILEDIALOG(INTL$("Choose a 640x480 png file for the live background"),INTL$("Select"), windowwidth, windowheight, 0)
grub_pick=FILEDIALOG(INTL$("Choose a png file for the grub background"),INTL$("Select"), windowwidth, windowheight, 0)
PROPERTY(info_dialog, "title", INTL$("Success"))
PROPERTY(wait_dialog, "title", INTL$("Please Wait"))
PROPERTY(error_dialog, "title", INTL$("Failure"))
PROPERTY(fatal_dialog, "title", INTL$("Failure"))

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Log Window
textwin = WINDOW(INTL$("Log Viewer"), windowwidth, windowheight)
showtext = EDIT(windowwidth, windowheight - 50)
ATTACH(textwin, showtext,0, 0)
txt_exit = BUTTON(INTL$("Main"), buttonwidth, buttonheight)
ATTACH(textwin, txt_exit, windowwidth -10 -buttonwidth, windowheight - 40)
HIDE(textwin)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Customize Window
custwin = WINDOW("Remastersys", windowwidth, windowheight)
wframe = FRAME(framewidth, frameheight)
ATTACH (custwin, wframe, frameleftmargin, frametopmargin)
TEXT(wframe, " Customize ")
rempic = IMAGE("/usr/share/pixmaps/remastersys-gui.png",framewidth - 10,128)
ATTACH(custwin, rempic, 10,10)
cust_splash = BUTTON(INTL$("Splash Image"), buttonwidth, buttonheight)
ATTACH(custwin,cust_splash, cola,rowa)
cust_splash_label = MARK(INTL$("Select a 640x480 png file for the live menu background"), buttonwidth * 3, buttonheight)
ATTACH(custwin,cust_splash_label, colb,rowa)
cust_grub = BUTTON(INTL$("Grub Image"), buttonwidth, buttonheight)
ATTACH(custwin,cust_grub, cola,rowb)
cust_grub_label = MARK(INTL$("Select a picture for the Grub menu background"), buttonwidth * 3, buttonheight)
ATTACH(custwin,cust_grub_label, colb,rowb)
cust_plymouth = BUTTON(INTL$("Plymouth Theme"), buttonwidth, buttonheight)
ATTACH(custwin,cust_plymouth, cola,rowc)
cust_plymouth_label = MARK(INTL$("Create and Select Plymouth theme"), buttonwidth * 3, buttonheight)
ATTACH(custwin,cust_plymouth_label, colb,rowc)
cust_user = BUTTON(INTL$("User Settings"), buttonwidth, buttonheight)
ATTACH(custwin,cust_user, cola,rowd)
cust_user_label = MARK(INTL$("Copy user settings to /etc/skel and be the default for all new users"), buttonwidth * 3, buttonheight)
ATTACH(custwin,cust_user_label, colb,rowd)
cust_conf = BUTTON(INTL$("Configure"), buttonwidth, buttonheight)
ATTACH(custwin,cust_conf, cola,rowe)
cust_conf_label = MARK(INTL$("Customize the settings for remastersys"), buttonwidth * 3, buttonheight)
ATTACH(custwin,cust_conf_label, colb,rowe)
cust_exit = BUTTON(INTL$("Main"), buttonwidth, buttonheight)
ATTACH(custwin, cust_exit, windowwidth -10 -buttonwidth, windowheight - 40)
PROPERTY(cust_splash_label,"xalign",0.0)
PROPERTY(cust_grub_label,"xalign",0.0)
PROPERTY(cust_plymouth_label,"xalign",0.0)
PROPERTY(cust_user_label,"xalign",0.0)
PROPERTY(cust_conf_label,"xalign",0.0)
HIDE(custwin)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Config File Window
conffilewin = WINDOW("remastersys.conf",windowwidth, windowheight)
rempiccf = IMAGE("/usr/share/pixmaps/remastersys-gui.png",framewidth - 10,128)
ATTACH(conffilewin, rempiccf, 10,10)
cframe = FRAME(framewidth, frameheight)
ATTACH (conffilewin, cframe, frameleftmargin, frametopmargin)
TEXT(cframe, " Config File ")
workdir = ENTRY(WORKDIR$,buttonwidth * 8 / 3, buttonheight)
ATTACH(conffilewin, workdir, colb, rwa)
workdir_lbl = MARK("WORKDIR", buttonwidth, buttonheight)
ATTACH(conffilewin, workdir_lbl, cola, rwa)
excludes = ENTRY(EXCLUDES$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, excludes, colb, rwb)
excludes_lbl = MARK("EXCLUDES", buttonwidth, buttonheight)
ATTACH(conffilewin, excludes_lbl, cola, rwb)
liveuser = ENTRY(LIVEUSER$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, liveuser, colb, rwc)
liveuser_lbl = MARK("LIVEUSER", buttonwidth, buttonheight)
ATTACH(conffilewin, liveuser_lbl, cola, rwc)
livecdlabel = ENTRY(LIVECDLABEL$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, livecdlabel, colb, rwd)
livecdlabel_lbl = MARK("LIVECDLABEL", buttonwidth, buttonheight)
ATTACH(conffilewin, livecdlabel_lbl, cola, rwd)
customiso = ENTRY(CUSTOMISO$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, customiso, colb, rwe)
customiso_lbl = MARK("CUSTOMISO", buttonwidth, buttonheight)
ATTACH(conffilewin, customiso_lbl, cola, rwe)
squashfsopts = ENTRY(SQUASHFSOPTS$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, squashfsopts, colb, rwf)
squashfsopts_lbl = MARK("SQUASHFSOPTS", buttonwidth, buttonheight)
ATTACH(conffilewin, squashfsopts_lbl, cola, rwf)
backupshowinstall = ENTRY(BACKUPSHOWINSTALL$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, backupshowinstall, colb, rwg)
backupshowinstall_lbl = MARK("BACKUPSHOWINSTALL", buttonwidth, buttonheight)
ATTACH(conffilewin, backupshowinstall_lbl, cola, rwg)
livecdurl = ENTRY(LIVECDURL$,buttonwidth *  8 / 3, buttonheight)
ATTACH(conffilewin, livecdurl, colb, rwh)
livecdurl_lbl = MARK("LIVECDURL", buttonwidth, buttonheight)
ATTACH(conffilewin, livecdurl_lbl, cola, rwh)
config_save_button = BUTTON(INTL$("Save"), buttonwidth, buttonheight)
ATTACH(conffilewin, config_save_button, windowwidth -10 -buttonwidth, windowheight - 40)
PROPERTY(workdir_lbl,"xalign",1.0)
PROPERTY(excludes_lbl,"xalign",1.0)
PROPERTY(livecdlabel_lbl,"xalign",1.0)
PROPERTY(customiso_lbl,"xalign",1.0)
PROPERTY(squashfsopts_lbl,"xalign",1.0)
PROPERTY(backupshowinstall_lbl,"xalign",1.0)
PROPERTY(livecdurl_lbl,"xalign",1.0)
PROPERTY(liveuser_lbl,"xalign",1.0)
HIDE(conffilewin)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM VTE Window
vtewin = WINDOW("Remastersys", windowwidth, windowheight)
vframe = FRAME(framewidth, frameheight)
ATTACH (vtewin, vframe, frameleftmargin, frametopmargin)
TEXT(vframe, INTL$(" Output "))
rempic = IMAGE("/usr/share/pixmaps/remastersys-gui.png",framewidth - 10,128)
ATTACH(vtewin, rempic, 10,10)
vte = vte_terminal_new()
REGISTER(vte, framewidth - 10 , frameheight - 25, "child-exited", 0, 0, 0, 0)
ATTACH(vtewin, vte, frameleftmargin + 5 , frametopmargin + 20)
HIDE(vtewin)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM user list Window
ulwin = WINDOW("Remastersys", windowwidth, windowheight)
ulframe = FRAME(framewidth, frameheight)
ATTACH (ulwin, ulframe, frameleftmargin, frametopmargin)
TEXT(ulframe, INTL$(" Select User whose settings will be copied to /etc/skel"))
rempic = IMAGE("/usr/share/pixmaps/remastersys-gui.png",framewidth - 10,128)
ATTACH(ulwin, rempic, 10,10)
list = LIST(framewidth - 10, frameheight - 25)
ATTACH(ulwin, list, frameleftmargin + 5 , frametopmargin + 20)
user_list_select = BUTTON(INTL$("Select"), buttonwidth, buttonheight)
ATTACH(ulwin, user_list_select, windowwidth -10 -buttonwidth, windowheight - 40)
HIDE(ulwin)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Plymouth Selection Window
plymouth_win = WINDOW("Remastersys", windowwidth, windowheight)
pwframe = FRAME(framewidth, frameheight)
ATTACH (plymouth_win, pwframe, frameleftmargin, frametopmargin)
TEXT(pwframe, INTL$(" Select Default Plymouth Theme for the system"))
rempic = IMAGE("/usr/share/pixmaps/remastersys-gui.png",framewidth - 10,128)
ATTACH(plymouth_win, rempic, 10,10)
plist = LIST(framewidth - 10, frameheight - 25)
ATTACH(plymouth_win, plist, frameleftmargin + 5 , frametopmargin + 20)
plymouth_select = BUTTON(INTL$("Select"), buttonwidth, buttonheight)
ATTACH(plymouth_win, plymouth_select, cla, windowheight - 40)
plymouth_new = BUTTON(INTL$("New"), buttonwidth, buttonheight)
ATTACH(plymouth_win, plymouth_new, clb, windowheight - 40)
plymouth_preview = BUTTON(INTL$("Preview"), buttonwidth, buttonheight)
ATTACH(plymouth_win, plymouth_preview, clc, windowheight - 40)
plymouth_back = BUTTON(INTL$("Back"), buttonwidth, buttonheight)
ATTACH(plymouth_win, plymouth_back, cld, windowheight - 40)
HIDE(plymouth_win)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Close Dialog
SUB close_dialog(NUMBER widget)
'SYSTEM "true"
FOCUS(prev_window)
HIDE(widget)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Quit
SUB fatal_dialog_run(NUMBER widget)
QUIT
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Info Dialog
SUB info_dialog_run(NUMBER widget)
FOCUS(prev_window)
HIDE(widget)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Check Return
SUB check_return
TEXT(showtext,"")
SHOW(main_window)
FOCUS(main_window)
HIDE(textwin)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Customize Return
SUB customize_return
    prev_window = main_window
SHOW(main_window)
FOCUS(main_window)
HIDE(custwin)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Get Status from vte_run
SUB get_status(NUMBER widget)
test_exit = vte_terminal_get_child_exit_status(widget)
IF test_exit NE 0 THEN
SHOW(error_dialog)
FOCUS(error_dialog)
HIDE(widget)
ELSE
TEXT(info_dialog, INTL$("Completed Successfully."))
SHOW(info_dialog)
FOCUS(info_dialog)
HIDE(widget)
ENDIF
SHOW(prev_window)
FOCUS(prev_window)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM VTE run
SUB vte_run(VAR arg$ SIZE size)
SHOW(vtewin)
FOCUS(vtewin)
HIDE(prev_window)
pid = vte_terminal_fork_command(vte, arg$[0], arg$, NULL, NULL, 0, 0 ,0)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Save Config File
SUB config_save
WORKDIR$ = GRAB$(workdir)
EXCLUDES$ = GRAB$(excludes)
LIVEUSER$ = GRAB$(liveuser)
LIVECDLABEL$ = GRAB$(livecdlabel)
CUSTOMISO$ = GRAB$(customiso)
SQUASHFSOPTS$ = GRAB$(squashfsopts)
BACKUPSHOWINSTALL$ = GRAB$(backupshowinstall)
LIVECDURL$ = GRAB$(livecdurl)
IF WORKDIR$ = "" THEN
WORKDIR$ = "/home/remastersys"
END IF
IF EXCLUDES$ = "" THEN
EXCLUDES$ = ""
END IF
IF LIVEUSER$ = "" THEN
LIVEUSER$ = "custom"
END IF
IF LIVECDLABEL$ = "" THEN
LIVECDLABEL$ = "Custom Live CD"
END IF
IF CUSTOMISO$ = "" THEN
CUSTOMISO$ = "custom$1.iso"
END IF
IF SQUASHFSOPTS$ = "" THEN
SQUASHFSOPTS$ = "-no-recovery -always-use-fragments -b 1M -no-duplicates"
END IF
IF BACKUPSHOWINSTALL$ != "0" THEN
BACKUPSHOWINSTALL$ = "1"
END IF
IF LIVECDURL$ = "" THEN
LIVECDURL$ = "http://www.remastersys.com"
END IF
OPEN "/etc/remastersys.conf" FOR WRITING AS conffile
WRITELN "#Remastersys Global Configuration File",NL$,NL$ TO conffile
WRITELN "# This is the temporary working directory and won't be included on the cd/dvd" TO conffile
WRITELN "WORKDIR=",CHR$(34),WORKDIR$,CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can add any other files or directories to be excluded from the live filesystem" TO conffile
WRITELN "# Separate each entry with a space" TO conffile
WRITELN "EXCLUDES=",CHR$(34),EXCLUDES$,CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can change the livecd/dvd username" TO conffile
WRITELN "LIVEUSER=",CHR$(34),LCASE$(LIVEUSER$),CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can change the name of the livecd/dvd label" TO conffile
WRITELN "LIVECDLABEL=",CHR$(34),LIVECDLABEL$,CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can change the name of the ISO file that is created" TO conffile
WRITELN "CUSTOMISO=",CHR$(34),CUSTOMISO$,CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can change the mksquashfs options" TO conffile
WRITELN "SQUASHFSOPTS=",CHR$(34),SQUASHFSOPTS$,CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can prevent the Install icon from showing up on the desktop in backup mode. 0 - to not show 1 - to show" TO conffile
WRITELN "BACKUPSHOWINSTALL=",CHR$(34),BACKUPSHOWINSTALL$,CHR$(34),NL$,NL$ TO conffile
WRITELN "# Here you can change the url for the usb-creator info" TO conffile
WRITELN "LIVECDURL=",CHR$(34),LIVECDURL$,CHR$(34),NL$ TO conffile
CLOSE FILE conffile
SHOW(custwin)
FOCUS(custwin)
HIDE(conffilewin)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Remastersys Backup Run
SUB backup_run
TEXT(vframe, INTL$(" Backup Mode "))
vte_run("remastersys", "backup")
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Remastersys Dist Run
SUB dist_run
TEXT(vframe, INTL$(" Dist Mode "))
vte_run("remastersys", "dist")
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Config Run
SUB config_run
SHOW(custwin)
FOCUS(custwin)
HIDE(main_window)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Plymouth
SUB plymouth_run
prev_window = custwin
TEXT(plist, "")
plymouth_list$ = EXEC$("update-alternatives --list default.plymouth")
SPLIT plymouth_list$ BY NL$ TO line$ SIZE dim
FOR i = 1 TO dim
IF line$[i - 1] != "" THEN
TEXT(plist,line$[i - 1])
END IF
NEXT
SHOW(plymouth_win)
FOCUS(plymouth_win)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Preview Plymouth
SUB preview_plymouth_run
SYSTEM "plymouth-preview"
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Plymouth Pic
SUB pick_plymouthpic_run
prev_window = plymouth_win
SHOW(plymouth_pick)
FOCUS(plymouth_pick)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Create Plymouth Run
SUB create_plymouth_run(NUMBER widget)
HIDE(plymouth_pick)
SHOW(wait_dialog)
FOCUS(wait_dialog)
SLEEP 100
SYNC
THEMEPIC$ = GRAB$(plymouth_pick)
SPLIT THEMEPIC$ BY "/" TO item$ SIZE dim
themepic$ = item$[(dim - 1)]
SPLIT themepic$ BY "." TO item$ SIZE dim
THEMENAME$ = item$[0]
THEMEDIR$ = CONCAT$("/lib/plymouth/themes/",THEMENAME$)
MAKEDIR THEMEDIR$
COPY THEMEPIC$ TO CONCAT$(THEMEDIR$,"/",themepic$)
COPY "/etc/remastersys/plymouth/remastersys-theme/progress_bar.png" TO CONCAT$(THEMEDIR$,"/progress_bar.png")
COPY "/etc/remastersys/plymouth/remastersys-theme/progress_box.png" TO CONCAT$(THEMEDIR$,"/progress_box.png")
COPY "/etc/remastersys/plymouth/remastersys-theme/remastersys-theme.plymouth" TO CONCAT$(THEMEDIR$,"/",THEMENAME$,".plymouth")
COPY "/etc/remastersys/plymouth/remastersys-theme/remastersys-theme.script" TO CONCAT$(THEMEDIR$,"/",THEMENAME$,".script")
SYSTEM CONCAT$("sed -i -e 's/__THEMEPIC__/",themepic$,"/g' ",THEMEDIR$,"/",THEMENAME$,".script")
SYSTEM CONCAT$("sed -i -e 's/__THEMENAME__/",THEMENAME$,"/g' ",THEMEDIR$,"/",THEMENAME$,".plymouth")
SYSTEM CONCAT$("sed -i -e 's/__THEMEDIR__/",THEMENAME$,"/g' ",THEMEDIR$,"/",THEMENAME$,".plymouth")
SYSTEM CONCAT$("update-alternatives --install /lib/plymouth/themes/default.plymouth default.plymouth ",THEMEDIR$,"/",THEMENAME$,".plymouth 80")
SYSTEM CONCAT$("update-alternatives --set default.plymouth ",THEMEDIR$,"/",THEMENAME$,".plymouth")
IF RETVAL NE 0 THEN
SHOW(error_dialog)
FOCUS(error_dialog)
ELSE
TEXT(info_dialog, INTL$("Plymouth Theme Created Successfully"))
SHOW(info_dialog)
FOCUS(info_dialog)
END IF
HIDE(wait_dialog)
TEXT(plist, "")
plymouth_list$ = EXEC$("update-alternatives --list default.plymouth")
SPLIT plymouth_list$ BY NL$ TO line$ SIZE dim
FOR i = 1 TO dim
IF line$[i - 1] != "" THEN
TEXT(plist,line$[i - 1])
END IF
NEXT
SHOW(plymouth_win)
FOCUS(plymouth_win)
HIDE(widget)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Plymouth Run
SUB pick_plymouth_run
PLYMOUTH$ = GRAB$(plist)
SPLIT PLYMOUTH$ BY " " TO item$ SIZE dim
IF dim > 0 THEN
SHOW(wait_dialog)
FOCUS(wait_dialog)
SLEEP 100
SYNC
SYSTEM CONCAT$("update-alternatives --set default.plymouth " , item$[0])
SYSTEM "update-initramfs -u"
IF RETVAL NE 0 THEN
SHOW(error_dialog)
FOCUS(error_dialog)
ELSE
TEXT(info_dialog, INTL$("Plymouth Theme Selected Successfully."))
SHOW(info_dialog)
FOCUS(info_dialog)
END IF
HIDE(wait_dialog)
END IF
SHOW(prev_window)
FOCUS(prev_window)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Plymouth Return
SUB plymouth_return
    prev_window = custwin
SHOW(custwin)
FOCUS(custwin)
HIDE(plymouth_win)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Splash
SUB splash_run
prev_window = custwin
SHOW(splash_pick)
FOCUS(splash_pick)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Splash Run
SUB pick_splash_run(NUMBER widget)
SPLASH$ = GRAB$(splash_pick)
COPY SPLASH$ TO "/etc/remastersys/isolinux/splash.png"
IF RETVAL NE 0 THEN
SHOW(error_dialog)
FOCUS(error_dialog)
ELSE
TEXT(info_dialog, INTL$("Live Menu Background set."))
SHOW(info_dialog)
FOCUS(info_dialog)
END IF
SHOW(custwin)
FOCUS(custwin)
HIDE(widget)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Grub
SUB grub_run
prev_window = custwin
SHOW(grub_pick)
FOCUS(grub_pick)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Pick Grub Run
SUB pick_grub_run(NUMBER widget)
GRUB$ = GRAB$(grub_pick)
SYSTEM "sed -i -e '/^GRUB_BACKGROUND/d' /etc/default/grub"
SYSTEM CONCAT$("echo 'GRUB_BACKGROUND=", CHR$(34), GRUB$, CHR$(34), NL$,"'", " >> /etc/default/grub")
SYSTEM "update-grub"
IF RETVAL NE 0 THEN
SHOW(error_dialog)
FOCUS(error_dialog)
ELSE
TEXT(info_dialog, INTL$("Grub Background set."))
SHOW(info_dialog)
FOCUS(info_dialog)
END IF
SHOW(prev_window)
FOCUS(prev_window)
HIDE(widget)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM List Users on System
SUB user_list_run(NUMBER widget)
ULSELECT$ = GRAB$(list)
SPLIT ULSELECT$ BY " " TO item$ SIZE dim
IF dim > 0 THEN
HIDE(widget)
SHOW(wait_dialog)
FOCUS(wait_dialog)
SLEEP 100
SYNC
SYSTEM CONCAT$("remastersys-skelcopy " , item$[0])
IF RETVAL NE 0 THEN
SHOW(error_dialog)
FOCUS(error_dialog)
HIDE(widget)
ELSE
TEXT(info_dialog, INTL$("User Settings Copied to /etc/skel Successfully."))
SHOW(info_dialog)
FOCUS(info_dialog)
HIDE(widget)
END IF
HIDE(wait_dialog)
END IF
SHOW(prev_window)
FOCUS(prev_window)
HIDE(ulwin)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM List User Run
SUB user_run
SHOW(wait_dialog)
FOCUS(wait_dialog)
prev_window = custwin
SLEEP 100
SYNC
TEXT(list, "")
OPEN "/etc/passwd" FOR READING AS pwfile
WHILE NOT(ENDFILE(pwfile)) DO
READLN line$ FROM pwfile
SPLIT line$ BY ":" TO item$ SIZE dim
IF dim > 0 THEN
IF VAL(item$[2]) > 999 AND VAL(item$[2]) < 2000 THEN
TEXT(list, item$[0])
END IF
END IF
WEND
CLOSE FILE pwfile
HIDE(wait_dialog)
SHOW(ulwin)
FOCUS(ulwin)
HIDE(prev_window)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Read Config File
SUB get_config_variables
IF FILEEXISTS("/etc/remastersys.conf") = 1 THEN
OPEN "/etc/remastersys.conf" FOR READING AS conffile
WHILE NOT(ENDFILE(conffile)) DO
READLN line$ FROM conffile
IF LEFT$(line$,1) != "#" OR line$ != "" THEN
SPLIT line$ BY "=" TO item$ SIZE dim
IF dim > 0 THEN
SELECT item$[0]
CASE "WORKDIR"
WORKDIR$ = CHOP$(item$[1],CHR$(34),0)
CASE "EXCLUDES"
EXCLUDES$ = CHOP$(item$[1],CHR$(34),0)
CASE "LIVEUSER"
LIVEUSER$ = CHOP$(item$[1],CHR$(34),0)
CASE "LIVECDLABEL"
LIVECDLABEL$ = CHOP$(item$[1],CHR$(34),0)
CASE "CUSTOMISO"
CUSTOMISO$ = CHOP$(item$[1],CHR$(34),0)
CASE "SQUASHFSOPTS"
SQUASHFSOPTS$ = CHOP$(item$[1],CHR$(34),0)
CASE "BACKUPSHOWINSTALL"
BACKUPSHOWINSTALL$ = CHOP$(item$[1],CHR$(34),0)
CASE "LIVECDURL"
LIVECDURL$ = CHOP$(item$[1],CHR$(34),0)
END SELECT
END IF
END IF
WEND
CLOSE FILE conffile
END IF
IF WORKDIR$ = "" THEN
WORKDIR$ = "/home/remastersys"
END IF
IF LIVEUSER$ = "" THEN
LIVEUSER$ = "custom"
END IF
IF LIVECDLABEL$ = "" THEN
LIVECDLABEL$ = "Custom Live CD"
END IF
IF CUSTOMISO$ = "" THEN
CUSTOMISO$ = "custom$1.iso"
END IF
IF SQUASHFSOPTS$ = "" THEN
SQUASHFSOPTS$ = "-no-recovery -always-use-fragments -b 1M -no-duplicates"
END IF
IF BACKUPSHOWINSTALL$ != "0" THEN
BACKUPSHOWINSTALL$ = "1"
END IF
IF LIVECDURL$ = "" THEN
LIVECDURL$ = "http://www.remastersys.com"
END IF
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Show Config File
SUB customize_config_run
CALL get_config_variables
TEXT(workdir, WORKDIR$)
TEXT(excludes, EXCLUDES$)
TEXT(liveuser, LIVEUSER$)
TEXT(livecdlabel, LIVECDLABEL$)
TEXT(customiso, CUSTOMISO$)
TEXT(squashfsopts, SQUASHFSOPTS$)
TEXT(backupshowinstall, BACKUPSHOWINSTALL$)
TEXT(livecdurl, LIVECDURL$)
SHOW(conffilewin)
FOCUS(conffilewin)
HIDE(custwin)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Remastersys Clean Run
SUB clear_run
SYSTEM "remastersys clean"
TEXT(info_dialog, INTL$("Working Folder Cleared."))
SHOW(info_dialog)
FOCUS(info_dialog)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Check Log File
SUB check_run
CALL get_config_variables
SHOW(wait_dialog)
FOCUS(wait_dialog)
SLEEP 100
SYNC
logtxt$=""
IF FILEEXISTS(CONCAT$(WORKDIR$,"/remastersys/remastersys.log")) = 1 THEN
OPEN CONCAT$(WORKDIR$,"/remastersys/remastersys.log") FOR READING AS logfile
WHILE NOT(ENDFILE(logfile)) DO
READLN txt$ FROM logfile
IF NOT(ENDFILE(logfile)) THEN
logtxt$ = CONCAT$(logtxt$, txt$,NL$)
ENDIF
WEND
CLOSE FILE logfile
HIDE(wait_dialog)
TEXT(showtext, logtxt$)
ELSE
HIDE(wait_dialog)
TEXT(showtext, INTL$("Logfile remastersys.log not found"))
ENDIF
SHOW(textwin)
FOCUS(textwin)
HIDE(main_window)
END SUB

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Callbacks for Buttons
CALLBACK(backup_button, backup_run)
CALLBACK(dist_button, dist_run)
CALLBACK(config_button, config_run)
CALLBACK(clear_button, clear_run)
CALLBACK(check_button, check_run)
CALLBACK(txt_exit, check_return)
CALLBACK(cust_plymouth, plymouth_run)
CALLBACK(cust_splash, splash_run)
CALLBACK(cust_grub, grub_run)
CALLBACK(cust_user, user_run)
CALLBACK(cust_conf, customize_config_run)
CALLBACK(cust_exit, customize_return)
CALLBACK(config_save_button, config_save)
CALLBACK(plymouth_select, pick_plymouth_run)
CALLBACK(plymouth_new, pick_plymouthpic_run)
CALLBACK(plymouth_preview, preview_plymouth_run)
CALLBACK(plymouth_back, plymouth_return)
CALLBACK(plymouth_pick, create_plymouth_run)
CALLBACK(splash_pick, pick_splash_run)
CALLBACK(grub_pick, pick_grub_run)
CALLBACK(error_dialog,close_dialog)
CALLBACK(info_dialog,close_dialog)
CALLBACK(fatal_dialog,fatal_dialog_run)
CALLBACK(vte, get_status)
CALLBACK(user_list_select, user_list_run)
CALLBACK(quit_button, QUIT)

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

REM Check if running by root
testroot$ = CHOP$(EXEC$("whoami"))
IF testroot$ != "root" THEN
SHOW(fatal_dialog)
FOCUS(fatal_dialog)
END IF


DISPLAY


I've asked for clarification on the basic converter forum to see if there is anything I can do.  I might have to create a separate 64-bit gui but it will be difficult since my 64-bit PC is my music recording pc that has AVLinux on it and I don't want to mess up my setup for testing right now.
Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
ourasi
Remastersys Testing Team
Full Member
*****
Offline Offline

Posts: 32


« Reply #28 on: April 10, 2012, 02:42:03 PM »

This is why I asked you for screenshots.  If you don't provide me with screenshots I can't help.

As for the user issue, it has nothing to do with remastersys.  You are going against how Ubuntu's casper scripts try to setup the user for the live.  This is your problem and not remastersys' problem.  I'm trying to tell you how to make a successful remaster and you keep fighting me on it.  Do as you please.

Cant you see the yellow colors in this screen shot, or is the hole picture missing?



You read /etc/remastersys.conf, take the first word from LIVECDLABEL and write that to /etc/casper.conf as USERNAME and HOST?

That is not MY problem, but yours - I know how to correct that manually.

I was 1st to load latest versions of remastersys and made over 30 test with it. Only thing I get from you is accusations how I make everything wrong. Have a nice day and better luck with some other better tester.
Logged
fragadelic
Administrator
Hero Member
*****
Offline Offline

Posts: 3920


Remastersys Developer and Founder


WWW
« Reply #29 on: April 10, 2012, 02:58:45 PM »

Oh brother.  Take a look at the code and you will see what it does and how.  The code is good on 32-bit.  My guess is that there is an addressing issue with the C binary on 64-bit.

I'm sorry but you are doing it wrong and it is clear from the Ubuntu casper autologin script that setting autologin on your system is WRONG for dist mode.  This has nothing to do with me - this is how the Ubuntu developers wrote casper and you have issues with it.  I'm telling you how to fix it but you refuse so live with it.

I'm not sure what the 64-bit issue is as I can't test it and you won't show me screenshots.  You simply post cut and paste code and that is not what I need to see.  I know it went wrong as I fully believe you but I need to figure out where it went wrong and how and need to see how the config file is being loaded.  So far there is an issue with writing the code back to /etc/remastersys.conf which is why saving it, going back in and saving again and then going back in will let me see exactly what is going on.  You seem to think you provided enough information and I'm asking for a bit more which you don't want to show me.  Not sure what else I can do.

I've posted on the bacon forum with my complete remastersys-gui and am waiting for Pjot to see if he can help without me having to buy a new hard drive for my 64-bit system which is not in budget anytime soon.

Logged

Please attach your remastersys.log for the system you are asking for help on as it helps me assist you much quicker.
Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!