# refracta.freeforums.org

place to talk about refracta

Skip to content

Welcome
Welcome to refracta You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

## Can't change host name with refractainstaller

Refracta Development, Scripts, etc.
Post a reply
17 posts • Page 2 of 2 • 1, 2

### Re: Can't change host name with refractainstaller

by dzz » Tue May 13, 2014 12:29 am

Please do try yad and say what happens.. It's not in Debian repos only because nobody yet vounteered to maintain it. Zenity by comparison seems bloated and semi-functional but I suppose we just feel obliged to support the "official" GUI dialog..
I don't use zenity at all and haven't seen any problem setting hostname with the latest installer but if you have, we need to know why.

dzz
  Posts: 647
  Joined: Wed Apr 27, 2011 11:53 am
  Location: Devon, England

Top

### Re: Can't change host name with refractainstaller

by shamil » Wed May 14, 2014 10:24 pm

I installed the latest version of yad. There wasn't really any current versions of it around for debian, so i installed the current version ubuntu binary, which worked. Refractasnapshot 9.1.0 now is less sloppy and works properly bringing up the name distribution box (of course after applying the extra space to line 550 in it's config file).
I also got to testing refractainstaller 9.1.0. It displays properly and operates properly now. Still failing on simple install, but earlier i should have noted it just stops in its tracks when it's adding the swap entry to fstab.
EDIT: I'd just drop support for zenity entirely. These tools were built with yad in mind. And getting yad for debian is just one binary. If anyone wants to use these tools, i'm pretty sure they can hunt down a yad binary like i did. These tools being run with zenity makes a user think they were poorly designed without much of a thought that they themselves chose the wrong dependency to use with them. I thought this way for a bit until i did some research on yad (i didn't care about how the tools looked via the gui, i liked how they worked and what they did, however yad makes things a lot cleaner and definitely matters in the function of these tools i found out; you guys chose yad for a reason). That's why i decided to eventually ask if using yad mattered at all. It seems it matters a great deal.

> fsmithred wrote:Sorry about that. Thanks for sticking with it until we solved it.

No problem man. In the beginning I was looking for an alternative to live-build since it's been doing nothing but failing for what is otherwise not that difficult a tool to use. The other alternative was simple-cdd, with nothing explaining how it worked, so i stayed away from it because i knew it would waste my time. The last answer is to make an iso from an installation. I am glad these tools are not remastersys, and beautifully a lot simpler in design and use. They have a lot of potential, and they're only getting better. My distribution is being built with and including these tools. I'm also bored and want to help out.
FURTHER EDIT: I will eventually test these tools on the credit card sized computer cubieboard. I own one, and the tools are processor architecture inependent. Time to do some research on yad for arm. The cubieboard is based on armhf architecture.

shamil
  Posts: 23
  Joined: Sun Mar 23, 2014 4:43 am

Top

### Re: Can't change host name with refractainstaller

by fsmithred » Thu May 15, 2014 11:19 am

Get yad debs (non-buntu) here:
http://debs.slavino.sk/pool/main/y/yad/
Newest version is 0.26.1-1, and I've been using 0.25.1-1 in sid. I commented out the line in sources.list, and I don't remember why. It's probably explained in a discussion around here somewhere. Just updated it, so if there's a problem, I guess I'll run into it.
How to add yad to sources.list:
http://debs.slavino.sk/
I look forward to the day I drop support for zenity. It may be sooner than I think.

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: Can't change host name with refractainstaller

by dzz » Thu May 15, 2014 12:21 pm

No need to use ubuntu packages. These are built for Debian (0.20.3-1 stable, 0.26.1-1 testing):
http://debs.slavino.sk
http://debs.slavino.sk/pool/main/y/yad/)
Dropping refracta support for zenity entirely for yad is a problem: another 3rd party dependency.
I tried using checkinstall to build from source on wheezy with no real problem. Maybe we could build the debs and mirror them with refracta tools?

dzz
  Posts: 647
  Joined: Wed Apr 27, 2011 11:53 am
  Location: Devon, England

Top

### Re: Can't change host name with refractainstaller

by fsmithred » Thu May 15, 2014 12:38 pm

I see the problem with the simple install. In debug mode, the error log stops here:

Code: Select all
  `+ grep -qs /target/*CENSORED*/sudoers`

In the script (line 1469) is this:

Code: Select all
  `grep -qs $oldname /target/*CENSORED*/sudoers`

The swapfile is already made before this.
The problem is, $oldname is only defined if $change_user is set to yes, and that can only happen with expert install. It hangs in the same place if you choose expert install and don't check the box to change user name.
I think the solution is for simple install to do nothing with passwords. Pretty sure that's the way it's been in the past. I'll have to check - I don't use simple install. (nader, are you reading this? comment?)

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: Can't change host name with refractainstaller

by fsmithred » Thu May 15, 2014 1:51 pm

I just tested it by moving one line up, so it's out of the conditional. That way, $oldname gets defined regardless of settings. Around line 1410 of refractainstaller-yad, I changed this:

Code: Select all
  `# Change the username
  if [[ $change_user = "yes" ]]; then
  oldname=$(awk -F: '/1000:1000/ { print $1 }' /target/*CENSORED*/passwd)
  newname=$(yad --entry --entry-text="$oldname" --title="Change login name" --text="Enter the new login name you want to use." --width=300 --button="OK":0)
  `

to this:

Code: Select all
  `# Change the username
  oldname=$(awk -F: '/1000:1000/ { print $1 }' /target/*CENSORED*/passwd)
  if [[ $change_user = "yes" ]]; then
  newname=$(yad --entry --entry-text="$oldname" --title="Change login name" --text="Enter the new login name you want to use." --width=300 --button="OK":0)
  `

The script completed successfully, and I could boot into the installation.

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: Can't change host name with refractainstaller

by shamil » Thu May 15, 2014 9:28 pm

Cool, grabbing proper yad for debian. I was able to get expert install to halt doing what it was doing also. I just didn't get around to finding out which option it was which would have been a wild goose chase for me, but i guess i could try running the debug version

shamil
  Posts: 23
  Joined: Sun Mar 23, 2014 4:43 am

Top

Previous Display posts from previous:
Sort by

Post a reply
17 posts • Page 2 of 2 • 1, 2

Return to Discuss

Jump to:

### Who is online

Users browsing this forum: No registered users and 0 guests

Donate Now
ProNight Style by ModphpBB3
Hosted by © 2017 FreeForums.org | Create a free forum | Powered by phpBB
A Member of the Crowdgather Forum Community
About FreeForums | Legal | Advertise Here | Investors | Contact FreeForums.org
Report Violation
suspicion-preferred