Installing Xubuntu on a 4 GB storage device (Eee PC 701)
Instead of using the xubuntu, or indeed any if the standard live or alternate *buntu iso's try a minimal cd.
https://help.ubuntu.com/community/Installation/MinimalCD
Make sure you are connected to the internet and then get the packages you want.
You can make it as minimal as you want to.
Boot with the livecd, once you have got past the start screen you will get options for language, location and keyboard layouts.
The installer will then detect hardware and ask for network configurations. Choose a mirror and select and appropriate archive for your locale.
After more configuration you will be able to add users and passwords, enable encryption if required.
Next setup your partitions as required
The installer now installs the base system, you will then be shown a software selection screen - I picked manual package selection, but then quit from aptitude when it was available. Wishing to install my packages later. You can if you wish select your packages here if you wish.
The installer will complete the install including grub install.
Once finished, reboot when asked removing the install medium.
You will boot into a command line at this stage.
Login and enter your password.
Here I installed the packages I wanted
sudo apt-get install xorg xterm lightdm firefox menu gksu synaptic --no-install-recommends
once installed those have installed, start the gui with startx
and you will boot into the xfce system. You can then complete the installation with the apps you want to use.
This install used 1.2Gb.
More information on installing with a minimal cd can be found here
http://www.psychocats.net/ubuntu/minimal
Enzo
Updated on September 18, 2022Comments
-
Enzo almost 2 years
I am building an application in which I want to save some user data by using
NSUserDefaults
, and it is a property of one of my controllers as following:@property (nonatomic, strong) NSUserDefaults *userPreference; @synthesize userPreference = _userPreference;
And I am trying to save something called a
scale
that should be a float, so I do something like this in the getter to put in some default values ofscale
in case user did not enter one:if (!_userPreference) { _userPreference = [NSUserDefaults standardUserDefaults]; } if (![_userPreference floatForKey:@"scale"]) { // if user has not entered this info yet // also 0 is not a valid value so I can do this [_userPreference setFloat:100.0 forKey:@"scale"]; // let default scale be 100.0 [_userPreference synchronize]; }
However, when I later on query this, no matter what I set in the default value, the following command:
[self.userPreference floatForKey:@"scale"];
always
return 1
. I am not sure what is happening. Am I not creating theNSUserDefaults
correctly?Thank you in advance!
-
DaVince almost 12 yearsSince I already tried the alternate installer several times and failed, I will be redownloading it to see if the disc image was somehow damaged. Thanks for the reply.
-
Amar about 11 years@VenkatManoharPerepa setFloat: expects a float value and not a NSString.
-
umer sufyan about 11 years1.Are you modifiying Your value after getting it ?? 2. and further try to create separate NSUSERDefaults object for Retrieving and Storing let's see. in case if you using separate functions for getting and setting values if not delete your application from simulator and clean it and rebuild it.
-
Vinayak Kini about 11 years@Durgaprasad We know 100.0 is float! the previous comment to which Amar was pointing out has been deleted!
-
rdelmar about 11 yearsDid you set it to 1 at some point? Once you've set it, the if clause will never evaluate to True again unless you go manually delete the user defaults for this app.
-
Enzo about 11 years@rdelmar hmm that might be the case! I will investigate.
-
Enzo about 11 years@rdelmar I don't think that's the case though. Since I just tried replacing the NSUserDefaults with NSMutableDictionary and it worked out fine. The value got saved properly.
-
rdelmar about 11 yearsI'm not sure what you mean by that. Just try deleting the "!" in your if clause. Run it once, put the "!" back and then retrieve the default and see if it changes to 100.
-
Enzo about 11 years@rdelmar Ha! that worked!!! Could it be that the default value for a number in
NSUserDefautlts
is1
? -
rdelmar about 11 yearsI don't think so. Are you sure you didn't use 1 the first time you tested it?
-
Enzo about 11 years@rdelmar I might have... Yeah I have to keep in mind that these data are persistent on the disk. Thank you so much for your help! You've helped me with 2 problems tonight already!
-
-
Catfish_Man about 11 yearsHow is this different from the existing methods on NSUserDefaults except for the generally unnecessary call to -synchronize? All you're doing is renaming them... with a typo.
-
SAMIR RATHOD about 11 yearsboth function are global and you can use it any where in you project. just call the function
-
Enzo about 11 yearsI have tried this as well, and that also returns 1 for some reason. For the same thing NSDictionary works as expected.
-
Amar about 11 years@Enzo You can also verify if the value is getting stored by looking for
KL.appname.plist
file @ location/Users/<username>/Library/Application Support/iPhone Simulator/<ios_version>/Applications/<appid>/Library/Preferences
. This plist will contain key and corresponding value. -
Enzo about 11 years@Valentin Shamardin I tried this and I did find the plist file. But even in the plist file the value for
scale
is still1
for some reason. So it didn't really work.