Porteus Settings Centre

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
agreimann
Samurai
Samurai
Posts: 137
Joined: 19 Apr 2011, 21:09
Location: U.S.

Re: Welcome box being implemented

Post#16 by agreimann » 03 Jun 2011, 00:23

As long as no one's DELETED KDE, I would think KDialog would work on both desktops. It certainly works on Gnome with Debian, and gdialog and zenity work under KDE; unless, of course, something has changed. Does LXDE not respect cross-compatibility?

If this truly is something I NEED to change, please let me know. I'll see what happens with LXDE when I test my program shortly.

Posted after 3 minutes 34 seconds:
Sorry for my rashness in the matter--yes, I understand that if the KDE module is deleted, that is the same as trashing KDE physically. I will change the program accordingly.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Welcome box being implemented

Post#17 by Ahau » 03 Jun 2011, 00:27

yes :) People can and do trash KDE entirely, to make a super lightweight OS for old hardware. There's also a very nice module that runs openbox and would allow users to delete KDE and LXDE. Flexibility rules!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
agreimann
Samurai
Samurai
Posts: 137
Joined: 19 Apr 2011, 21:09
Location: U.S.

Re: Welcome box being implemented

Post#18 by agreimann » 03 Jun 2011, 23:52

xdialog is not installed? This is the one that I believe I was going to switch to, guys. ;)

Would using dialog work, or do we actually have xdialog, and my system did not detect that? Please reply--and I will work with things to meet your request/input.

Posted after 22 hours 54 minutes 59 seconds:
Guys--I'm actually serious on this one. xdialog, unlike the other things I have been able to find, comes up as not found. :wall: This is not a sleep bug. Is xdialog really there (maybe I downloaded a bad copy of Porteus or something), or do I use dialog? To verify this, I have also booted with and without changes appended to see if there's a difference.

Once I'm able to get an answer to this question, and adapt the program to your response, I will release the program (which self-contains the source code since it uses bash) to you guys. Please reply. It will be very appreciated!

Posted after 5 minutes 6 seconds:
Again, just to reiterate one more time to make sure it does what you want, as of right now, this program: 1) welcomes the user to Porteus, 2) opens up the package manager to save changes, 3) opens up the wireless control panel to set up the Internet, 4) changes the root and guest passwords, 5) opens the language selection tool, and finally quits when everything is set. Changes will be saved like how any other change is made, as of right now. Also, if the media is read-only, then obviously, changes will not be kept on shutdown or reboot.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Welcome box being implemented

Post#19 by Ahau » 04 Jun 2011, 02:15

I think maybe it's not called from the CLI with 'xdialog', though I could be wrong. If you can run extpkg, rempkg, xpns-tool, or any of the various porteus scripts that run in GUI, then xdialog is installed and running (I'm assuming you're in V1 RC2). In fact, take a look at those scripts to see how they're implementing it.
Please take a look at our online documentation, here. Suggestions are welcome!

roadie
Full of knowledge
Full of knowledge
Posts: 205
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 3.5...with a twist
Location: In a hayfield

Re: Welcome box being implemented

Post#20 by roadie » 04 Jun 2011, 02:59

It sounds like a great program, but, I don't think it should run automatically. I wouldn't want it popping up when I boot, I can do my own settings. Maybe pop up a window on the first run, asking the user if they would like to run a settings wizard, but don't just run it. That's too much "in your face".
I also think most users hardware is found and set up very well in Porteus, not a lot of point in running a network wizard if the net's already configured. Wireless, I know little about, never use it.

Why open up a package manager for changes? At first boot, little has changed, apart from configs. Is it backgrounded and saving everything?.........that could lead to fun times. Then there's the matter of users running from a CD, probably a much less important deal, given the prevalence of cheap USB sticks, but still a consideration.

Again, it sounds like a great program and would be a great addition as a menu item, with even more added.........a control panel thingy, partitioning, setting up swaps, that kinda stuff.

Oh, ya, I kill KDE all the time........it's almost a tradition. :P

roadie

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Welcome box being implemented

Post#21 by Ahau » 04 Jun 2011, 05:56

Ok, I'm in 32-bit RC2 now. xdialog is installed....it runs as 'Xdialog', did you use an upper case X, or lower case? It must be upper case.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
agreimann
Samurai
Samurai
Posts: 137
Joined: 19 Apr 2011, 21:09
Location: U.S.

Re: Welcome box being implemented

Post#22 by agreimann » 05 Jun 2011, 07:42

Thanks again, Ahau. Sorry for not posting sooner. Yes, I had that figured out--appearently, I've been blaming my computer, but my flash drive is what is at fault. It has to be plugged in just right--or Porteus won't work right on wake or when it's running normally. Found this out when I boot without it having to read changes off itself or when I boot off a CD. :)

There's one little thing I found with my program that I hope you guys won't mind if I reworked. Because I couldn't get wicd to start as the wireless configurator, because to do so, I would have had to restart the service, which would be annoying to users, again, I reworked this idea. The entire tray applet and the system "daemon" would have to restart to force the pane open--which I think is a pain. If a launch the pane of wicd as a solitaire Python application, I cannot--because it is owned by system services, even when I try spawning it as root. Therefore, I will have the app kindly suggest that the user clicks the icon at the bottom of the screen, and show an icon of what it looks like in the Settings Assistant. I think the user can figure it out from there alright. :D Or we can alternatively use wpa_gui, but that does not always read wpa_supplicant right...

Thanks for your input and advice, everyone! And thank you, Ahau, for trying to help--like I said, I've narrowed down all my weird problems to a flash drive. 8) I will have my first contribution to Porteus submitted sometime tomorrow! :Yahoo!:

Posted after 23 hours 16 minutes 14 seconds:
It's tomorrow, and I have the program in a very wobbly pre-release stage. For instance, the Skip buttons do not have the proper conditions yet. After you guys see it, I'll still have to put quite a bit of work in it.

However, if you guys know where I can upload the Porteus Settings Assistant, I can definitely submit it to you guys.
Last edited by agreimann on 07 Jun 2011, 23:51, edited 1 time in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5554
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Welcome box being implemented

Post#23 by brokenman » 05 Jun 2011, 13:27

I believe Hamza started mediafire account for Porteus that you can use. I'll ask him to PM you the login details.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
agreimann
Samurai
Samurai
Posts: 137
Joined: 19 Apr 2011, 21:09
Location: U.S.

Re: Welcome box being implemented

Post#24 by agreimann » 06 Jun 2011, 00:02

Thanks, but I have everything, including a wiki page, ready to go for the Porteus community at Google Code. I think that's the best place I could put this for now, as it is a respectable code center, like Savannah or SourceForge, where anyone in the world can not only see the file, but learn what it is about, and what it does.

Here is the direct link to the project: http://code.google.com/p/porteus-settings-assistant/

I really hope you guys like this PRE-release or concept version. It is very wobbly, and it is NOT the "finished" and "polished" product. Let me know if it least says and does something close to what you want--it is a visual concept as proof to show I at least wrote a framework for it.
Last edited by agreimann on 07 Jun 2011, 23:52, edited 1 time in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5554
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Welcome box being implemented

Post#25 by brokenman » 06 Jun 2011, 12:59

Good work.

We already have a google code page that you can include this stuff on.

porteus.googlecode.com
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4614
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Welcome box being implemented

Post#26 by fanthom » 06 Jun 2011, 17:34

@agreimann
few things to fix:
a) pls use /tmp/.terminal instead of konsole
b) oxygen icons gonna work for kde4 only
c) would like to get full package:
- /opt/porteus-scripts/welcome-box.sh (capital letters are not necessary: you know yourself about troubles with finding Xdialog)
- /usr/share/applications/porteus-settings-assistant.desktop
d) "skip" button in first window could be replaced with "cancel" which quit apps.

waiting on second release :)
Please add [Solved] to your thread title if the solution was found.

User avatar
agreimann
Samurai
Samurai
Posts: 137
Joined: 19 Apr 2011, 21:09
Location: U.S.

Re: Welcome box being implemented

Post#27 by agreimann » 06 Jun 2011, 19:45

I will add several fixes and additions to the program as scheduled for the alpha release. Thank you for your input. I hope you liked the work thus far.

What will be updated by the real release:

- Icon change to another icon scheme. If people will delete the KDE module, it is certain oxygen will be, too. The first alpha simply tested how icons would look in a trial release. But, the truth is, I like the Oxygen icons. Maybe I can put them directly in the package, and credit the Oxygen icon team for their use, rather than looking in /usr/share/icons for them.
- 0 and 1 button coding for first box to proceed/quit; program will change into several stages to work *properly*, rather than one clumped file with stages in it. Before uploading to Google Code, I already had to clean up quite a bit of garbage in my coding, which is why not even the Skip buttons work right now. But, this will unforunately require a resources folder be in porteus-scripts for it, but it will keep the code clean, and it will allow me to focus on making sure it "just works" and is bug-free.
- Installer will be included to copy program to porteus scripts and to include a Desktop template.
- As I noticed in Porteus code last night, it did occur to me to switch to the /tmp method of working. Thank you for confirming I will need to make this change.
- New filenames will be compliant with the classic FHS standards of Unix/Posix--in other words, this next alpha will use lowercase filenames for compatibility with that.

Should have the alpha in within the next few days. Then, if you guys really like what you see, we can bump this to beta stage, and then final.
Last edited by agreimann on 07 Jun 2011, 23:53, edited 2 times in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5554
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Welcome box being implemented

Post#28 by brokenman » 06 Jun 2011, 23:27

Good job !!. I think it is OK to include your icons. Xdialog has the icon function. If i get some time i would like to rewrite the language tool for GUI. Maybe for after v1.0. i also think that adding gksu to LXDE, and using a GUI 'switch to root' would be nicer ... but this has nothing to do with your app.

A couple of suggestions.

1. Add a function called check_button. This will allow people to close using the X at top. Then put it directly after each dialog. check_button

Code: Select all

check_button(){
case $? in 
  1 )
  "Put your cancel command here for cancel button"
  exit
  ;;
  255 )
  "Put your cleanup code here"
  exit
  ;;
esac
}
2. Use the --left switch in your wizard boxes to align text to the left, and perhaps don't use double spacing unless needed. The box could be a little smaller.
here is an example of what i would use for a yesno.

Code: Select all

Xdialog --title "Whatever" --left --ok-label "next" --cancel-label "Close" --yesno \
"Put your first line of text here. Using this method\n\
Allows you to measure out the text and make sure\n\
most of the lines are even. For a double space use \n\n\
Click next to continue" 0 0
3. Have a look at the -help switch in Xdialog, it creates an extra button with help which can be useful at times. I hate using the wizard and prefer to just have a flowing script and using yesno, but changing cancel to "skip" ... but each to his own i guess.

I am getting a FATAL ERROR after 'Keep your PC secure' Konsole is unable to open a PTY. Konsole needs to have readwrite. I think fanthoms suggestion of using the built in terminal sniffer will fix this. Hopefully this will be available for v1.0.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Welcome box being implemented

Post#29 by Ahau » 06 Jun 2011, 23:34

enabling the built in firewall might be a useful function of this script as well --just a thought. Instructions are in Porteus Tips n Tricks, on the main site under info--docs--general information.

haven't had a chance to test this script out yet --maybe tonight :)

thanks!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
agreimann
Samurai
Samurai
Posts: 137
Joined: 19 Apr 2011, 21:09
Location: U.S.

Re: Welcome box being implemented

Post#30 by agreimann » 07 Jun 2011, 00:21

Just read your input and suggestions, guys.

Yes, I did forget to mention the font alignment will change. I'm *really* sorry about that--yes, I will align fonts to the left when I can, and should have remembered to say something earlier. I looked at the program run before upload, and I thought "that looks ugly. Doesn't conform to any guidelines I've ever seen! Oh, well... I'll fix that next time." Shouldn't have done that. :)

Also, the button code will be added--please be patient. This is what 0-1 button code from a control panel that opens two locations I wrote looks like, and this would be the sort of thing I would implement into the Settings Assistant:

# Set variable
open_place=$?

# Define buttons and actions applicable to what the user will click

case $open_place in
0) dolphin ~;;
1) dolphin /usr/share/wallpaper;
esac

Note that this allows users to click either an OK or cancel button, for instance, using a case argument. 0 represents OK, 1 is cancel. I might add you can add other buttons, and that you can 255 for Esc, for instance. I could use an if argument or read, but this wouldn't be that convenient. I'm a little frustrated that in a little impatience, someone is trying to show me case, which I very much use and understand. In fact, these afore mentioned, plus while, for, and others date back to the days of shell only, where lists and dialog seemed to be the only friendly thing. But the shell is the best place to learn how to code anyway.

The release I gave you guys was a pre-release--it was only a demo to prove I was working on it. The next release will be a lot better. Please, patience is a virtue! :D Don't assume I don't know something or won't put something because the pre-release doesn't have it yet!
Last edited by agreimann on 07 Jun 2011, 23:54, edited 2 times in total.

Post Reply