OnSessionEnd delete username from applicationlist

Hi everyone,
I need some help with the OnSessionEnd function within my
Application.cfc, let me explain:
When users log in to the website their username gets stored
in an application list 'users' (so I can show the users currently
online on the website, for example.). When a user clicks the logout
button I delete them from that list, everything working like it
should be here. But when users just close their browser window they
don't get logged out, so I have set a sessiontimout value and use
an OnSessionEnd function.
Now my question is, how do I delete the user from the list
within the OnSessionEnd function? How do I search for a user that
is already gone -> can't search for #GetAuthUser()# since he is
already gone).
I hope you understand what I'm trying to say :)
Anyway thanks in advance any help is much appreciated!

Thanks for the comments but it's not working yet, I modified
the code a little bit, this is what I have now:
on login:
<cfset #SESSION.u_naam# = #FORM.loginusername#>
<cfset #SESSION.u_ip# = #CGI.REMOTE_ADDR#>
<cflogin>
<cfloginuser name='#login.ledenNickname#'
password='#hash(login.ledenPaswoord)#'
roles='#login.ledenRechten#'>
<cfset application.users = ListAppend(application.users,
'#SESSION.u_naam#(#SESSION.u_ip#)')>
</cflogin>
application.cfc onsessionend:
<cffunction name="onSessionEnd" returnType="void"
output="false">
<cfset findUser = #ListContains(application.users,
'#SESSION.u_naam#(#SESSION.u_ip#)')#>
<cfif findUser EQ 0>
<cfelse>
<cfset application.users =
#ListDeleteAt(#application.users#, #findUser#, ",")#>
</cfif>
<cflogout>
</cffunction>
I made a 'checkpage' to see what's in the list
application.users and what's in the sessions u_naam and u_ip, when
my session ends (put a 10 second timeout) and I go to this page, I
see that the application.users list hasn't changed, but I do get an
error that the sessions u_naam and u_ip are not found... (so the
session really did end).
The only thing I can think of is that my "onSessionEnd" code
in the application.cfc isn't executed... I do a ListContains in
that function and I already tried to set the application.users list
to "bleh" if the findUser variable was 0 and even that didn't work
:), it just doesn't get executed I think.
Any help? :)
Thx

Similar Messages

  • How can i delete a UserName  from a text file using Strings or io.

    hi i m trainee
    i have been assigned to make java program which deletes a UserName and
    his Passwor from a Text File
    i m unable to do it using the code below
    plz help
    do reply
      import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java .applet.*;
    import java.io.*;
    class Del extends JFrame  implements ActionListener
         String s2;
         JTextField CWDMUserDText = new JTextField();
         JButton CWDMSecDelButton = new JButton("DELETE");
         JLabel CWDMUserLabel = new JLabel("USER NAME");
         JPasswordField CWDMPassDText = new JPasswordField();
         JLabel CWDMPassLabel = new JLabel("PASSWORD");
         //String user,pass;
         /* CONSTRUCTOR*/
              Del()
                   Container contentPane=getContentPane();
                   contentPane.setLayout(null);
                  setLocation(400,200);
                   contentPane.add(CWDMUserDText);
                   contentPane.add(CWDMSecDelButton);
                   contentPane.add(CWDMUserLabel);
                   contentPane.add(CWDMPassDText);
                   contentPane.add(CWDMPassLabel);
                  CWDMUserLabel.setBounds(20,70,100,25);
                  CWDMPassLabel.setBounds(20,100,100,25);
                   CWDMUserDText.setBounds(150,70,100,25);
                   CWDMPassDText.setBounds(150,100,100,25);
                   CWDMSecDelButton.setBounds(80,135,100,25);
                   CWDMUserDText.addActionListener(this);
                   CWDMPassDText.addActionListener(this);
                   CWDMSecDelButton.addActionListener(this);
                   contentPane.setBackground(Color.CYAN);
                   setVisible(true);
                   setDefaultCloseOperation(EXIT_ON_CLOSE);
         public void actionPerformed(ActionEvent ae)
                  if(ae.getSource()==CWDMSecDelButton)
         //             user = CWDMUserDText.getText();
         //          pass = CWDMPassDText.getText();
         //          showarr();
                   s2 = CWDMUserDText.getText();
                   CWDMUserDText.setText("");
                   CWDMPassDText.setText("");
                   DelUser(s2);
              public static void main(String args[])
                   Del myframe1= new Del();
                   myframe1.setSize(300,200);
                   myframe1.setVisible(true);
              public void DelUser(String s)
                   //int a;
                   try
                        FileReader fr = new FileReader("file.txt");
                        BufferedReader br = new BufferedReader(fr);
                       String s1;
                       int a;
                       int len = s.length();
                       System.out.println(len);
                       //s2 = CWDMUserDText.getText();
                        while ((s1=br.readLine()) !=null)
                             if((a=s1.indexOf(s))>0 && (a=s1.indexOf(s))!=0)
                                  System.out.println(a);
                        fr.close();
                   catch(FileNotFoundException e)
                        System.out.println("exception occured");
                   catch(IOException e)
                        System.out.println("io");
         }

    Some tips:
    1) If you are adding or deleting stuff from a text file you need to write a new, modified file and then, optionally, do something like:
    rename the old file to whatever.bak or the like.
    rename the new file to the old.
    2) Don't depend on System.out so much on a GUI application. For example if you get an exception use javax.swing.JOptionPane to display an alert (and show the message from the exception). You can write the stack trace to System.out if you want.
    3) Don't muck about with calculating bounds for screen objects, let a layout manager sort it out. I like BoxLayoutManager for most things like this.
    4) For bonus points do your IO in a separate Thread. Generally you don't want anything happening in an actionPerformed method which significantly delays it's return. The method should launch a new Thread to do the job, and disable the button until the Thread finishes.

  • I deleted cookies from my computer and now I can't access sites that require usernames/passwords

    I recently deleted cookies from my computer and now I can't access any of the sites i used to use with usernames/passwords. even after requesting ne wpasswords etc. the pages just keep resetting

    If you are using Safari, empty the Safari cache.
    With Safari open, press Command + Option + E on your keyboard.
    Quit and relaunch Safari to test.
    ***   When you post for help, please state which OS X is installed.
    If you aren't sure, click About this Mac from your Apple menu 
    Troubleshooting advice can depend on that information.

  • Deleting previous usernames from system

    When I go to log into email websites such as yahoo or hotmail, as soon as I hit a letter all of the usernames starting with that letter that have ever logged in pop up in a scroll down menu. Simply clearing history doesn't delete these. How do I delete these from record?

    In Clear Recent History make sure Form and Search History is selected. Choose everything in time range then click Clear Now

  • Delete file from folder only (not from list)

    Hi all,
    I've searched a lot and didn't succeed so far, that's why I need your help. In a cloud context, I'm actually creating and uploading files (pdf and/or xml files) "on the go" to sharepoint folders via the SOAP API and this is perfectly working. But
    in a cloud context, I also need to decomission services which is translated into deleting files into Sharepoint.
    That's where it became complicated, because according to the API we cannot delete files if they are not part of a list structure, which is not my case. Is that true ?
    The only info I have when trying to delete a file via the SOAP Api is : its name, its folder, and the endpoint where the folder is. So my question remains simple I guess : is this possible ? If so, how to (a link to the SOAP body would be usefull)
    Thanks a lot
    Regards
    Baptiste

    Hi,
    According to your post, my understanding is that you want to delete file from folder.
    In SharePoint 2010, It is recommended to use Client Object Model to achieve it, the following code snippet for your reference:
    string siteURL = "http://siteurl";
    ClientContext context = new ClientContext(siteURL);
    //specific user
    NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
    context.Credentials = credentials;
    Web web = context.Web;
    context.Load(web);
    context.ExecuteQuery();
    string relativeUrl =web.ServerRelativeUrl +"/DocumentLibraryName/FolderName/FileName";
    File file = web.GetFileByServerRelativeUrl(relativeUrl);
    context.Load(file);
    file.DeleteObject();
    context.ExecuteQuery();
    If you still want to use SOAP API, we can use the UpdateListItems method under Lists web service to achieve it.
    http://www.dhirendrayadav.com/2010/06/delete-list-items-using-web-service.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/61466984-1844-48a1-8c1e-1c59a0f9876a/move-and-delete-files-remotely-using-sharepoint-web-services-?forum=sharepointdevelopmentlegacy
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Cannot remove deleted user from people picker - SharePoint Foundation 2010

    So I think I've read all the people picker articles here and I can't find a solution so I thought I'd start a new thread. Here is the issue:
    A user was deleted from Active Directory and removed from SharePoint Foundation 2010. The user was still showing in the People Picker within the site collection, so we have performed a few things to try and get rid of this user.
    User is deleted from AD
    User is deleted from SharePoint Site Collection
    Have tried stsadm -o deleteuser
    Have removed all mention of this user from UserInfo table
    User does NOT show in
    https://<SiteCollectionURL/_layouts/people.aspx?MembershipGroupId=0
    Cannot find any mention of this user anywhere.
    Ran a full crawl as we read on a forum somewhere that it might help.
    If I try and add the user back to SharePoint I get "The user does not exist or is not unique"
    If I try "stsadm -o deleteuser -userlogin DOMAIN\USER -url https://<sitecollectionurl>" I get "The user does not exist or is not unique"
    I am not sure what else I can try now. Can anyone help?
    Thanks,
    Vinny
    Vinny

    No other domain trusts that this user could be in.
    Just so everyone can stop with the warnings, we do NOT regularly delete users from the UserInfo table and fully are aware of the problems behind it, which is why it is so rarely done. But at times, you have to do what you have to do to help a customer, you
    know? This one user is the only one that was removed from the UserInfo table, but there are a few other users that are also deleted (from SharePoint, not manually from UserInfo) that are still showing as well. This one user included.
    There MUST be another place that the people picker gets it's information from. ALL of the user's old information still shows in the people picker (username, email address, display name), and yet none of that information exists anywhere other than in the
    People Picker. Mailbox is gone from Exchange, User deleted from SharePoint, User deleted from Active Directory. Is there no cache someone could point me towards that People Picker might store information in.
    Vinny

  • Delete Dialogue not appearing... can't delete songs from hard-drive

    After downloading ver 7.0.2 I can't delete songs from my hard-drive by deleting them in iTunes.
    There's supposed to be a dialogue(sp?) box that shows up when you delete a song in the main library (not in playlists), that asks you if you want to permanantly delete a file (song, movie, etc), or if you only want to delete it from the iTunes list.
    It's not showing up for me, so I have to seek out the folder and delete the song manually in Windows.
    I'd get this problem occasionaly in the older versions, but usually a restart of the program, or in worse cases, rebooting the computer would solve the problem, but not this time.
    I've tried re-installing the program, but no luck.
    Any ideas?
    Thanks.

    I tried the following fix, and it didn't work..
    Is anyone else having this problem after upgrading to 7.0.2?
    I'm sure I didn't check the box in the delete dialog that says "do not show this again"
    I've also tried hitting the shift key when deleting.. still no luck.
    HELP!!
    Resetting the iTunes Preference Files:
    -- Quit iTunes
    -- Delete C:\Documents and Settings\<your username>\Application Data\Apple Computer\iTunes\iTunes.pref
    -- Delete C:\Documents and Settings\<your username>\Local Settings\Application Data\Apple Computer Inc\iTunes.pref
    You may need to enable 'Show Hidden Files/Folders' in Windows Explorer==>Tools menu==>Folder Options==>’View’ tab before you can see the Application Data & Local Settings folders.
    This will force iTunes to run the setup assistance the next time you open it. You'll have to go back and re-set any preferences you want changed from the iTunes default. When you restart iTunes, it will perform its initial startup process. Do not let iTunes search for your music files. The old library is still there and iTunes will see it after it gets past the initial dialog screens.

  • How to delete files from time machine volume

    Before selling my old MacBook Pro, I had backed up all my data on to an external WD hard drive using Time Machine. I had since switched to a desktop but since I did not have any need for the MacBook Pro files at the time, I had put aside that WD hard drive. Recently, I wanted to clear some space on that external drive to make way for some of my present files. I drilled down in to Backups.backupdb and tried to delete files, but was met with the error "
    An error occurred.The operation couldn’t be completed. (OSStatus error -5000.) Insufficient access privileges for operation".
    It did prompt me for a username and password before showing that message. I tried both my current user/pass as well as (what I remember to be) my old user/pass on the MacBook Pro. Both presented me with the same error message.
    I also did try to mount the drive as Time Machine on my present system, and then try to enter Time Machine and delete it from there. However, clicking on "Enter Time Machine ... " does nothing.
    Any ideas?

    Hi Linc,
    my back-up data is managed by Time Machine; the actual data is on a second internal Hard Drive with a capacity of 1TB - not partitioned. I am using Time Machine and have access to all data backed up since Mavericks Clean Install but not the data prior to this date.
    When I open the 1TB drive in Finder I can see a folder "Backups.backupdb/Sigi's Mac Pro/ followed by many folders of backup dates going back to 2010-09-20-103441 and up to 2014-02-07-142414 all followed with folder Macintosh HD.  February 7th  2014 was the date of the clean install.
    These Backups are followed by backup date folder 2014-02-08-075554 with a subfolder of MacPro-320GB (this is the name I assigned to my Boot Drive during formatting; I suspect I should have assigned the same name as before ie. Macintosh HD) and 2014-02-11 with a subfolder Macintosh HD, these are the ones I get access to by way of Time Machine > Restore.
    Weird thing is on Febr 11 when I relised my possible mistake and renamed the Bootdrive back to what it was initially ie. Macintosh HD despite this I have access to all backup data since the Clean Install in both folders MacPro-320GB as well as Macintosh HD but not to any data prior to the Clean Install.
    Is there something that Time Machine knows and prevents access or is it simply a matter of renaming the subfolder 2014-02-08-07554/MacPro-320GB to ........./Macintosh HD?
    I like to restore selectively and not everything - It was hard work reinstalling apps that were supposed to be the troublemakers (ref my discussion on Maverick problems) but I now need to get onto data specific to some of these apps as well as other data I may have missed. Long story? Yes and sorry.
    Sigi

  • Not able to delete files from desktop

    I have a mid 2009 Macbook Pro Model running Mac OS X Lion... I am unable to delete some files from my desktop..One is an image file and other is an application.. I checked that i have read/write privileges,I am the admin and the files are not locked...
    When I try to delete the files, it asks me for my admin password, I type the password correctly, then it makes a characteristic sound indicating the deletion process but does not delete the file!!
    Any help in this will be really apprecaited
    Thanks..

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Launch the Terminal application by entering the first few letters of its name into a Spotlight search. Drag or copy -- do not type -- the following line into the window, then press return:
    chmod -R -N ~
    If you get an error message about permissions, enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • Deleting data from text files

    Hi there,
    I am having a real battle trying to delete data from a text file I am using. There seems to be this giant cloud with Java, where there is no real easy way to delete text from a file??
    I have a JFrame with two textfields on it where you enter the username and pcname. There is a OK button once you have entered those details.
    On action event I would like those two details, to be removed from the text file that has been read in.
    I have a text file like this:
    bob
    pc1
    bill
    pc2
    The data above gets written no problem, one at at a time using the below.
    File f = new File("\\c:\\filename.txt");
    String strToWrite;
    try
    FileOutputStream fstr = new FileOutputStream(f);
    strToWrite = username1+ '\r'+'\n' ;
    byte[] bytes = strToWrite.getBytes(); fstr.write(bytes);
    strToWrite = pcname1 + '\r'+'\n' ;
    byte[] bytes2 = strToWrite.getBytes(); fstr.write(bytes2);
    strToWrite = username2+ '\r' +'\n' ;
    byte[] bytes3 = strToWrite.getBytes(); fstr.write(bytes3);
    strToWrite = pcname2 + '\r'+'\n' ;
    byte[] bytes4 = strToWrite.getBytes(); fstr.write(bytes4);
    catch (IOException e)
    System.out.println("Error -- " + e.toString());
    To read them back in I have made the follwoing:
    BufferedReader br= null;
    Count = 0;
    try
    br = new BufferedReader(new InputStreamReader(new FileInputStream("\\c:\\filename.txt")));
    String s = "";
    while((s=br.readLine()) != null )
    Count = 1;     
         //System.out.println("Data is " + s);
         inboundtext = s;
         if ( Count == 1 )
    break;
    while((s=br.readLine()) != null )
    //System.out.println("Data is " + s);
    inboundtext = s;
    Count = 2;
    if ( Count == 2 )
    break;
    catch(IOException ie)
    finally
    try
         if(br!=null) br.close();
    catch(Exception e)
    Now the above I know, is reading each line of the text file one at a time.
    Now what I would like is that when the text that we got from the textfields, using getText(), be removed from the file without destroying the rest of the records in there? Why is it so easy to add and replace files, but not do any deleting from them?
    please help!!

    sorry, FileOutputStream fstr = new FileOutputStream(f);
    should be FileOutputStream fstr = new FileOutputStream(f, true);

  • Unless I repair my hard drive every other day I am unable to delete songs from iTunes or email messages from Postbox. I've only had an iMac for a few weeks, is this normal?

    Unless I repair my hard drive every other day I am unable to delete songs from iTunes or email messages from Postbox. I've only had an iMac for a few weeks, is this normal?

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if it frightens you, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password dialog will open. You’re not going to reset a password.
    In the dialog, select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • What is the "Other" category under storage and how can i delete items from this?

    My disc is almost full.  "About this Mac" says that I have 47 GB of "Other."  What is this Other and how can I delete items from this?

    For information about the Other category in the Storage display, see this support article.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
    iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then reboot. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown asBackups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Reboot and it should go away.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install ODS in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders, sorted by size with the largest at the top. It may take a few minutes for ODS to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with ODS, quit it and also quit Terminal.

  • Problem moving/deleting files from time machine backup

    I recently ran into some problems with my hardrive and had to get it replaced at the mac store.
    Unfortunatly, i only ran a partial time machine backup on the hardrive before i lost it.
    Fotrunatly though, it did manage to save some important stuff, but now for the next problem....
    I have dragged my files from my external hardrive with the partial time machine backup onto my new desktop but it wont let me do stuff with them
    this includes;
    asking for my password whenever i want to delete one of them
    saying "cannnot be modified" whenever i try to drag the files to a new location.
    as you can imagine, this is a bit of a pain.
    anyone have anything similair?
    help would be great
    thanks
    Chris

    That is not how you restore from a Time Machine backup.
    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Back up all data now. Before proceeding, you must be sure you can restore your system to its present state
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • How do I delete items from start up disk?

    My start up disk is almost full.  How do I delete items from it?

    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
    iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then restart the computer. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as  Backups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Ask for instructions in that case.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) or GrandPerspective (GP) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one. Note that ODS only works with OS X 10.8 or later. If you're running an older OS version, use GP.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS or GP can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install the app you downloaded in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the corresponding line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    sudo /Applications/GrandPerspective.app/Contents/MacOS/GrandPerspective
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders, sorted by size. It may take a few minutes for the app to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with the app, quit it and also quit Terminal.

  • How do you delete MobileMe from the system

    How can I delete MobileMe from my macbook OS X 10.6.8, it has a popup coming in every 10mins or so saying wrong username & password, there is still an icon in the system preferences which I cannot delete & check boxes for the program in iCal & mail. I have tried system/library/preferencepanes as suggested in other threads on this topic but the folder is already empty. Please help me before I go crazy!

    Thanks I did that, but everytime I try to open a new mail account I see esomthing that brings up ICloud.

Maybe you are looking for