[SOLVED]Why does .bash_profile seem tobe read in non-login shells too?

~/.bash_profile:
. $HOME/.bashrc
~/.bashrc:
export PATH=$PATH:$HOME/code/shell
(irrelevant lines left out)
(I have no ~/.profile, ~/.bash_login or * ~/.bash_logout. I have also never edited /etc/profile or /etc/bash.bashrc.)
I've read that in a login shell (e.g. TTY1) only the former is read, which in my case sources the latter. Running "export -p" in TTY1 gives a result consistent with this:
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/lazar/code/shell" (/home/lazar/code/shell is only listed once)
I've also read that in a non-login shell (e.g. xterm) only the latter is read. However, when I run "export -p" in xterm or urxvt I get an unexpected result:
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/lazar/code/shell:/home/lazar/code/shell" (/home/lazar/code/shell is listed twice!)
This implies that ~.bashrc is read twice, perhaps because .bash_profile is read in non-login shells too, even though it shouldn't be, should it? It doesn't seem to matter really, but I can't help but wonder why...
[EDIT]
I've found the answer. Exports from .bash_profile are done at boot time and *remain* active while X is active. Opening a non-login shell will cause .bashrc to export as well. Hence the duplication. My solution:
~/.bash_profile:
export PATH=$PATH:$HOME/code/shell
. $HOME/.bashrc
~/.bashrc:
(lines other than export commands)
Last edited by Lazar (2011-02-14 07:57:56)

As I wondered, I think it's a problem with passwd. I don't have a dbus entry and must have missed it when I was copying things around between my version and the .pacnew. Downloading an install disc now since I can't seem to change it from the recovery console due to mounting root read-only.
I'd love to know of a way to boot that avoids starting dbus and other things that might break while still having read/write access to root. Will mark solved once I update /etc/passwd and reboot.

Similar Messages

  • Why does Lion seem slower than Snow Leppard?

    Why does Lion seem slower than Snow Leppard?

    michaelfromrice lake wrote:
    Why does Lion seem slower than Snow Leppard?
    It's anyone's guess.  Startup and shutdown as well as application launches take longer in Lion than they did in Snow Leopard on the three Macs that I "upgraded," and I also see the spinning beach ball more often than I used to.  Add to that the HDMI-related crashes on my Mac mini...
    Quite frankly, I have yet to see where I have gained any advantages after upgrading to Lion, and I definititely have problems that I didn't have under Snow Leopard.  Of course, all of it must be my fault, as Apple would never ever relase an upgrade that was less than perfect.

  • Why does my new Adobe Reader XI not allow double sided printing?

    Why does my new Adober Reader XI not allow double sided printing as the previous version did?

    Moving this discussion to the Scanning & OCR forum.

  • Why does fcpx suddenly stop reading audio files? ever since i upgraded to Yosemite. Than when I check it on my hard drive it doesn't work as well. Only this file. Am in a trouble of delivering now. Any help?

    why does fcpx suddenly stops reading audio files? ever since i upgraded to Yosemite. Than when I check it on my hard drive it doesn't work as well. Only this file. Am in a trouble of delivering now. Any help?

    Could be systems logs or some other system file growing.
    Use OmniDiskSweeper or DaisyDisk to map what's being used.
    Regards,
    Shawn

  • Imovie (and idvd) does not seem to read my mpeg files ?

    imovie and idvd does not seem to read my collection of mpeg movies. Do they need to be converted to some other format ?

    Welcome to the  Discussion Forums.
    Mpeg1 and 2 files will need converting (Mpegstreamclip can do this - QT mpeg2 playback component required for mpeg2)
    Mpeg 4 files will generally be OK but some may need converting.

  • Why does my signature box appear as "none" instead of the signature I have designated?

    Why does my signature box appear as "none" instead of the signature I have designated?

    Rebuild the Spotlight index. If you try to search now from the magnifying-glass icon in the top right corner of the display, there will be an indication that indexing is in progress.

  • I just purchased a new to me ibook g4 I have all the disks but the cd does not seem to read them properly. I wanted to re install everythMost everything works anyway except my address book application , help how do I reinstall

    I just purchased a new to me ibook g4. I have all the disks but they do not seem to work properly. When I restart holding the C key they just spit out of the drive. I wanted to reset everything back to factory and start over but no go. Most everything works anyway except my address book application. It seems to be missing. How can I download and reinstall a new address book App. Thanks, John

    iBook G4/1.33 12-Inch (Mid-2005 - Op)
    1.33 GHz PowerPC 7447a (G4)
    Intro Date:
    July 26, 2005
    Disc Date:
    May 16, 2006
    Order No:
    M9846LL/A
    Model No:
    A1133 (EMC N/A)
    Subfamily:
    iBook G4 - Mid-2005
    Model ID:
    PowerBook6,7
    Std. RAM:
    512 MB
    Std. VRAM:
    32 MB
    Std. HD:
    40 GB (4200 RPM)
    Std. Optical:
    8X "Combo Drive"
    Complete iBook G4/1.33 12-Inch (Mid-2005 - Op) Specs
    The problem with accessing the content of the disks is the CD Drive does not seem to access them. It also has a heck of a time ejecting them. Other disks seem to read. The unit came with imovie disks and I can use them. The disks look perfectly good no scratches but they just don't work, I was hoping I could just get a online copy of the address book to replace the one that seems to be missing. Or find it somewhere on my drive. Have no clue where to look though. 

  • Why does Mail not support read receipts?

    I find it hard to believe that there is a single email application that doesn't support read receipts. For me it is a fairly basic feature I would expect any decent Mail application to have.
    I am currently in the process of writing an email to a company and I want to make sure they get it - a read receipt is how I want to verify that they've had it. Why does Mail not support this?
    If I am going to have to accept that Mail is not the first class application Apple keeps parading around - is there an alternative that offers this and other features I would expect to find in Microsoft Outlook (minus the calendar etc...)?

    Outlook uses a Microsoft-proprietary system for "read receipts", so there may be no way Apple could implement it, or there may be licensing fees involved, or Apple may just not feel that it's worth spending the money to implement. Outlook which is designed to work primarily with an Exchange server, so it's in Microsoft's interest to support Exchange features (note that even Microsoft in their own Mac app do not support all the features theydo on Windows).
    You can express your interest in this feature to Apple via their feedback pages, if you wish:
    http://www.apple.com/feedback/macosx.html
    but support for return receipts in any system other than Exchange is very unlikely, since as Matt said it is not part of the Internet email specification and hence not widely supported at all.
    Regards.

  • On my MacBook Pro with Retina Display, Why does the "USB Devices Disabled Unplug the device using too much power to re-enable USB devices" keep coming up after I unplugged the usb device?

    On my MacBook Pro with Retina Display 15", that I purchased a few weeks ago, started coming up with the following message on my desktop:
    "USB Devices Disabled Unplug the device using too much power to re-enable USB devices".
    I unplugged the device and the message still keeps coming up.
    This is what I have done so far to troubleshoot:
    I shut down the laptop. When booting up I pressed the command+option+p+r at the same time. It comes up with a menu to reinstall OSX, Get help online, Run Disk Utility, etc. I choose the disk utility and repair the disk and then restarted.
    The message keeps popping up and I can't seem to get rid of it. Why does the message keep popping up even though I don't have any devices hooked up to the laptop at all? Any help to reenable my usb ports and get rid of the messaage would be helpful.

    I talked to Apple Support and we at least stopped the bleeding, a little bit. These are the troubleshooting steps I did before I contacted Apple Support:
    1. Reinstalled OSX
    2. Restore the last known good Time Machine Backup.
    This did not fix my issue, so I called Apple Support and they told me this:
    1. Turn Power off.
    2. Wait 15 seconds.
    3. Plug in Magsafe adapter.
    4. Wait 15 seconds.
    5. Hold down the Shift+Option+Power Button for 20-30 seconds.
    6. Turn Power back on.
    Ok, this stopped the bleeding a little, but as soon as I plugged in a Apple USB Superdrive
    and a Apple Mini Displayport to VGA Adapter. This "USB Devices Disabled" pop-up pops up like every 30 minutes now. At least, it is not constantly popping up after I close it, so I guess it will do for the temporary. Going to contact Apple support, later, though to see what else can be done.

  • Why does it keep asking me for the login keychain password?

    I am having a problem where my imac keeps asking me for a "login keychain" password. I type in my password every time, but that doesn't fix my problem. I need to know if this is bad or not, and how i can turn it off.
    Thanks!

    Hey there Daniel,
    It sounds like you are being prompted over and over for your Login Keychain, and entering it does not seem to make the prompts stop. I would start by running First Aid on the Keychain with this article:
    Mac OS X 10.6: Solving problems with keychains
    http://support.apple.com/kb/ph7296
    To check keychains for problems using Keychain First Aid:
    Open Keychain Access, located in the Utilites folder in the Applications folder.
    Choose Keychain Access > Keychain First Aid.
    Enter your user name and password.
    Select Verify and click Start. Any problems found will be displayed.
    If there are problems, select Repair, and then click Start.
    If that does not resolve the issue, I would next reset your Keychain:
    In Keychain Access, choose Preferences from the Keychain Access menu.
    If available, click the Reset My Default Keychain button. This will remove the login keychain and create a new one with the password provided.
    If Reset My Default Keychain is not available, choose Keychain List from the Edit menu.
    Delete the "login" keychain.
    The next time you log in to the account, you can save your current password in a keychain.
    From: OS X: Keychain Access asks for keychain "login" after changing login           password
              http://support.apple.com/kb/ht1631
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • [SOLVED] Why does `dd if=/dev/zero of=/dev/sdc` cause disk-reads?

    I have noticed this on multiple occasions. When wiping a drive, but also when writing other content to it; both atop and iotop show that the disk is reading and writing the same amount of data. This feels like it is slowing down the writing I want it to do. Is there an option in dd I'm missing? Happens on multiple machines, kernels and disks. It feels like the linux-kernel is verifying what was written to the disk; but I cannot find any documentation on this
    Last edited by Spider.007 (2014-07-15 07:43:21)

    The default dd block size is 512 bytes, which is the traditional size of HDD sectors.
    However, most of the time, Linux performs disk IO in 4kB blocks. When you submit a sequence of 512 byte write requests, it reads a 4kB block, modifies it part-by-part in 512 byte chunks, writes it back, reads another 4kB block and so on.
    Setting bs to at least 4kB should eliminate the reads. Increasing it to few MB may improve performance slightly further by reducing the number of individual write requests and hence the time spent by the kernel on "understanding" them.
    Last edited by mich41 (2014-07-15 09:31:43)

  • Why does this class not read and write at same time???

    I had another thread where i was trying to combine two class files together
    http://forum.java.sun.com/thread.jspa?threadID=5146796
    I managed to do it myself but when i run the file it does not work right. If i write a file then try and open the file it says there are no records in the file, but if i close the gui down and open the file everything get read in as normal can anybody tell me why?
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import bank.BankUI;
    import bank.*;
    public class testing extends JFrame {
       private ObjectOutputStream output;
       private BankUI userInterface;
       private JButton SaveToFile, SaveAs, Exit; //////////savetofile also saves to store need to split up and have 2 buttons
       //private Store store; MIGHT BE SOMETHING TO DO WITH THIS AS I HAD TO COMMENT THIS STORE OUT TO GET IT WORKING AS STORE IS USED BELOW
       private Employee record;
    //////////////////////////////////////from read
    private ObjectInputStream input;
       private JButton nextButton, openButton, nextRecordButton ;
       private Store store = new Store(100);
         private Employee employeeList[] = new Employee[100];
         private int count = 0, next = 0;
    /////////////////////////////////////////////from read end
       // set up GUI
       public testing()
          super( "Employee Data" ); // appears in top of gui
          // create instance of reusable user interface
          userInterface = new BankUI( 9 );  // nine textfields
          getContentPane().add( userInterface, BorderLayout.CENTER );
          // configure button doTask1 for use in this program
          SaveAs = userInterface.getSaveAsButton();
          SaveAs.setText( "Save as.." );
    //////////////////from read
    openButton = userInterface.getOpenFileButton();
          openButton.setText( "Open File" );
    openButton.addActionListener(
             // anonymous inner class to handle openButton event
             new ActionListener() {
                // close file and terminate application
                public void actionPerformed( ActionEvent event )
                   openFile();
             } // end anonymous inner class
          ); // end call to addActionListener
          // register window listener for window closing event
          addWindowListener(
             // anonymous inner class to handle windowClosing event
             new WindowAdapter() {
                // close file and terminate application
                public void windowClosing( WindowEvent event )
                   if ( input != null )
                             closeFile();
                   System.exit( 0 );
             } // end anonymous inner class
          ); // end call to addWindowListener
          // get reference to generic task button doTask2 from BankUI
          nextButton = userInterface.getDoTask2Button();
          nextButton.setText( "Next Record" );
          nextButton.setEnabled( false );
          // register listener to call readRecord when button pressed
          nextButton.addActionListener(
             // anonymous inner class to handle nextRecord event
             new ActionListener() {
                // call readRecord when user clicks nextRecord
                public void actionPerformed( ActionEvent event )
                   readRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
    //get reference to generic task button do Task3 from BankUI
          // get reference to generic task button doTask3 from BankUI
          nextRecordButton = userInterface.getDoTask3Button();
          nextRecordButton.setText( "Get Next Record" );
          nextRecordButton.setEnabled( false );
          // register listener to call readRecord when button pressed
          nextRecordButton.addActionListener(
             // anonymous inner class to handle nextRecord event
             new ActionListener() {
                // call readRecord when user clicks nextRecord
                public void actionPerformed( ActionEvent event )
                   getNextRecord();
             } // end anonymous inner class
          ); // end call to addActionListener
    ///////////from read end
          // register listener to call openFile when button pressed
          SaveAs.addActionListener(
             // anonymous inner class to handle openButton event
             new ActionListener() {
                // call openFile when button pressed
                public void actionPerformed( ActionEvent event )
                   SaveLocation();
             } // end anonymous inner class
          ); // end call to addActionListener
          // configure button doTask2 for use in this program
          SaveToFile = userInterface.getSaveStoreToFileButton();
          SaveToFile.setText( "Save to store and to file need to split this task up" );
          SaveToFile.setEnabled( false );  // disable button
          // register listener to call addRecord when button pressed
          SaveToFile.addActionListener(
             // anonymous inner class to handle enterButton event
             new ActionListener() {
                // call addRecord when button pressed
                public void actionPerformed( ActionEvent event )
                   addRecord(); // NEED TO SPLIT UP SO DONT DO BOTH
             } // end anonymous inner class
          ); // end call to addActionListener
    Exit = userInterface.getExitAndSaveButton();
          Exit.setText( "Exit " );
          Exit.setEnabled( false );  // disable button
          // register listener to call addRecord when button pressed
          Exit.addActionListener(
             // anonymous inner class to handle enterButton event
             new ActionListener() {
                // call addRecord when button pressed
                public void actionPerformed( ActionEvent event )
                   addRecord(); // adds record to to file
                   closeFile(); // closes everything
             } // end anonymous inner class
          ); // end call to addActionListener
          // register window listener to handle window closing event
          addWindowListener(
             // anonymous inner class to handle windowClosing event
             new WindowAdapter() {
                // add current record in GUI to file, then close file
                public void windowClosing( WindowEvent event )
                             if ( output != null )
                                addRecord();
                                  closeFile();
             } // end anonymous inner class
          ); // end call to addWindowListener
          setSize( 600, 500 );
          setVisible( true );
         store = new Store(100);
       } // end CreateSequentialFile constructor
       // allow user to specify file name
    ////////////////from read
      // enable user to select file to open
       private void openFile()
          // display file dialog so user can select file to open
          JFileChooser fileChooser = new JFileChooser();
          fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
          int result = fileChooser.showOpenDialog( this );
          // if user clicked Cancel button on dialog, return
          if ( result == JFileChooser.CANCEL_OPTION )
             return;
          // obtain selected file
          File fileName = fileChooser.getSelectedFile();
          // display error if file name invalid
          if ( fileName == null || fileName.getName().equals( "" ) )
             JOptionPane.showMessageDialog( this, "Invalid File Name",
                "Invalid File Name", JOptionPane.ERROR_MESSAGE );
          else {
             // open file
             try {
                input = new ObjectInputStream(
                   new FileInputStream( fileName ) );
                openButton.setEnabled( false );
                nextButton.setEnabled( true );
             // process exceptions opening file
             catch ( IOException ioException ) {
                JOptionPane.showMessageDialog( this, "Error Opening File",
                   "Error", JOptionPane.ERROR_MESSAGE );
          } // end else
       } // end method openFile
    public void readRecord() // need to merger with next record
          Employee record;
          // input the values from the file
          try {
         record = ( Employee ) input.readObject();
                   employeeList[count++]= record;
                   store.add(record);/////////ADDS record to Store
              store.displayAll();
              System.out.println("Count is " + store.getCount());
             // create array of Strings to display in GUI
             String values[] = {
                        String.valueOf(record.getName()),
                            String.valueOf(record.getGender()),
                        String.valueOf( record.getDateOfBirth()),
                        String.valueOf( record.getID()),
                             String.valueOf( record.getStartDate()),
                        String.valueOf( record.getSalary()),
                        String.valueOf( record.getAddress()),
                           String.valueOf( record.getNatInsNo()),
                        String.valueOf( record.getPhone())
    // i added all those bits above split onto one line to look neater
             // display record contents
             userInterface.setFieldValues( values );
          // display message when end-of-file reached
          catch ( EOFException endOfFileException ) {
             nextButton.setEnabled( false );
          nextRecordButton.setEnabled( true );
             JOptionPane.showMessageDialog( this, "No more records in file",
                "End of File", JOptionPane.ERROR_MESSAGE );
          // display error message if class is not found
          catch ( ClassNotFoundException classNotFoundException ) {
             JOptionPane.showMessageDialog( this, "Unable to create object",
                "Class Not Found", JOptionPane.ERROR_MESSAGE );
          // display error message if cannot read due to problem with file
          catch ( IOException ioException ) {
             JOptionPane.showMessageDialog( this,
                "Error during read from file",
                "Read Error", JOptionPane.ERROR_MESSAGE );
       } // end method readRecord
       private void getNextRecord()
               Employee record = employeeList[next++%count];//cycles throught accounts
          //create aray of string to display in GUI
          String values[] = {String.valueOf(record.getName()),
             String.valueOf(record.getGender()),
              String.valueOf( record.getStartDate() ), String.valueOf( record.getAddress()),
         String.valueOf( record.getNatInsNo()),
         String.valueOf( record.getPhone()),
             String.valueOf( record.getID() ),
               String.valueOf( record.getDateOfBirth() ),
         String.valueOf( record.getSalary() ) };
         //display record contents
         userInterface.setFieldValues(values);
         //display record content
    ///////////////////////////////////from read end
    private void SaveLocation()
          // display file dialog, so user can choose file to open
          JFileChooser fileChooser = new JFileChooser();
          fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
          int result = fileChooser.showSaveDialog( this );
          // if user clicked Cancel button on dialog, return
          if ( result == JFileChooser.CANCEL_OPTION )
             return;
          File fileName = fileChooser.getSelectedFile(); // get selected file
          // display error if invalid
          if ( fileName == null || fileName.getName().equals( "" ) )
             JOptionPane.showMessageDialog( this, "Invalid File Name",
                "Invalid File Name", JOptionPane.ERROR_MESSAGE );
          else {
             // open file
             try {
                output = new ObjectOutputStream(
                   new FileOutputStream( fileName ) );
                SaveAs.setEnabled( false );
                SaveToFile.setEnabled( true );
              Exit.setEnabled( true );
             // process exceptions from opening file
             catch ( IOException ioException ) {
                JOptionPane.showMessageDialog( this, "Error Opening File",
                   "Error", JOptionPane.ERROR_MESSAGE );
          } // end else
       } // end method openFile
       // close file and terminate application
    private void closeFile()
          // close file
          try {
              //you want to cycle through each recordand add them to store here.
                                            int storeSize = store.getCount();
                                            for (int i = 0; i<storeSize;i++)
                                            output.writeObject(store.elementAt(i));
             output.close();
    input.close();// from read!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
             System.exit( 0 );
          // process exceptions from closing file
          catch( IOException ioException ) {
             JOptionPane.showMessageDialog( this, "Error closing file",
                "Error", JOptionPane.ERROR_MESSAGE );
             System.exit( 1 );
       } // end method closeFile
       // add record to file
       public void addRecord()
          int employeeNumber = 0;
          String fieldValues[] = userInterface.getFieldValues();
          // if account field value is not empty
          if ( ! fieldValues[ BankUI.IDNUMBER ].equals( "" ) ) {
             // output values to file
             try {
                employeeNumber = Integer.parseInt(
                   fieldValues[ BankUI.IDNUMBER ] );
                        String dob = fieldValues[ BankUI.DOB ];
                        String[] dateofBirth = dob.split ("-"); // what used to put between number chnage to /
                        String sDate = fieldValues[ BankUI.START ];
                        String[] startDate = sDate.split ("-");
                        String sex = fieldValues[ BankUI.GENDER ];
                        char gender = (sex.charAt(0)); // check if m or f prob check in employee
    if ( employeeNumber >= 0 ) {
                  /* create new record =String name, char gender, Date dob, String add, String nin, String phone, String id, Date start, float salary*/
                    record  = new Employee(
                    fieldValues[ BankUI.NAME ],
                        gender,
                    new Date(     Integer.parseInt(dateofBirth[0]),
                              Integer.parseInt(dateofBirth[1]),
                              Integer.parseInt(dateofBirth[2])),
                        fieldValues[ BankUI.ADDRESS ],
                        fieldValues[ BankUI.NATINTNO ],
                        fieldValues[ BankUI.PHONE ],
                        fieldValues[ BankUI.IDNUMBER ],
              new Date(     Integer.parseInt(startDate[0]),
                              Integer.parseInt(startDate[1]),
                              Integer.parseInt(startDate[2])),
              Float.parseFloat( fieldValues[ BankUI.SALARY ] ));
                        if (!store.isFull())
                             store.add(record);
                        else
                        JOptionPane.showMessageDialog( this, "The Store is full you cannot add\n"+
                         "anymore employees. \nPlease Save Current File and Create a New File." );
                             System.out.println("Store full");
                        store.displayAll();
                        System.out.println("Count is " + store.getCount());
                                  // output record and flush buffer
                                  //output.writeObject( record );
                   output.flush();
                else
                    JOptionPane.showMessageDialog( this,
                       "Account number must be greater than 0",
                       "Bad account number", JOptionPane.ERROR_MESSAGE );
                // clear textfields
                userInterface.clearFields();
             } // end try
             // process invalid account number or balance format
             catch ( NumberFormatException formatException ) {
                JOptionPane.showMessageDialog( this,
                   "Bad ID number, Date or Salary", "Invalid Number Format",
                   JOptionPane.ERROR_MESSAGE );
             // process exceptions from file output
             catch ( ArrayIndexOutOfBoundsException ArrayException ) {
                 JOptionPane.showMessageDialog( this, "Error with Start Date or Date of Birth\nPlease enter like: 01-01-2001",
                    "IO Exception", JOptionPane.ERROR_MESSAGE );
                      // process exceptions from file output
             catch ( IOException ioException ) {
                 JOptionPane.showMessageDialog( this, "Error writing to file",
                    "IO Exception", JOptionPane.ERROR_MESSAGE );
                closeFile();
          } // end if
       } // end method addRecord
       public static void main( String args[] )
          new testing();
    } // end class CreateSequentialFile

    Sure you can read and write at the same time. But normally you would be reading from one place and writing to another place.
    I rather regret avoiding the OP's earlier post asking how to combine two classes. I looked at the two classes posted and realized the best thing to do was actually to break them into more classes. But I also realized it was going to be a big job explaining why and how, and I just don't have the patience for that sort of thing.
    So now we have a Big Ball Of Tar&trade; and I feel partly responsible.

  • [SOLVED] Why does jre7-openjdk-headless require a version bump?

    I'm attempting to update my system, and I get the following error.
    sudo pacman -Syu
    :: Starting full system upgrade...
    resolving dependencies...
    looking for inter-conflicts...
    :: jre7-openjdk-headless and jre7-openjdk-headless-infinality are in conflict. Remove jre7-openjdk-headless-infinality? [y/N]
    error: unresolvable package conflicts detected
    error: failed to prepare transaction (conflicting dependencies)
    :: jre7-openjdk-headless and jre7-openjdk-headless-infinality are in conflict
    I presume pacman wants to remove jre7-openjdk-headless-infinality because it's 7.u65_2.5.1-3, while jre7-openjdk-headless is 7.u65_2.5.1-8. I presume jre7-openjdk-headless-infinality will be updated soon, and I won't get this error.
    However, I was interested in what exactly was requesting this version bump in the first place. I presume that it's a package that jre7-openjdk-headless-infinality is a dependency for. I looked firstly at what needed to be updated on my system, noting jre7-openjdk.
    $ pacman -Qu
    calibre 1.206.0-1
    device-mapper 2.02.108-1
    ffmpeg 1:2.3.1-1
    jdk7-openjdk 7.u65_2.5.1-3
    jre7-openjdk 7.u65_2.5.1-3
    lib32-krb5 1.12.1-2
    lvm2 2.02.108-1
    mesa-demos 8.2.0-1
    xf86-input-synaptics 1.8.0-2
    I had a look at the reverse dependencies for jre7-openjdk-headless-infinality, noting jre7-openjdk again.
    $ pacman -Qii jre7-openjdk-headless-infinality
    Provides : java-runtime-headless=7 jre7-openjdk-headless
    Depends On : libjpeg-turbo lcms2 nss ca-certificates-java
    Required By : jre7-openjdk
    Conflicts With : openjdk6 jre7-openjdk-headless jre7-openjdk-headless-fontfix
    I interpret that as pacman -Syu saying that jre7-openjdk needs an update, and this also depends on jre7-openjdk-headless-infinality. I double checked this.
    $ pacman -Qi jre7-openjdk
    Provides : java-runtime=7
    Depends On : jre7-openjdk-headless xdg-utils hicolor-icon-theme
    So I can see that jre7-openjdk actually depends on jre7-openjdk-headless, which can be provided by jre7-openjdk-headless-infinality (as above). However, I don't understand why a new version of jre7-openjdk requires a bump in version of jre7-openjdk-headless (or jre7-openjdk-headless-infinality). Have I misunderstood something?
    Last edited by Salkay (2014-08-24 12:34:29)

    EDIT: actually, when testing the different "useSystemAAFontSettings" parameters I somehow missed "on" - that one does indeed work well enough with the arch java packages. I still prefer the "--enable-infinality=yes" version, but you can scrap my whining below - PEBCAK.
    Wikimig wrote:What I mean is: I think you don't even need Infinality patch (just like most of people using this package). I am pretty sure you can get to a nice clean look with official Arch Linux packages.
    I completely understand that the official package has to remove the infinality flag if it breaks (default) non-infinality setups - but:
    You should definitely give fontconfig-infinality a try (very easy to install thanks to bohoomil's bundle). In my experience it massively improves font rendering. However, the current java7-openjdk really does not work with it, there is no way to get a nice clean look. I tried all the AA settings, and they were all terrible.
    Best settings with vanilla java7
    Same settings with --enable-infinality
    It looks even worse in reality, but just zoom in all the way to the left upper corner and compare... these are some pretty sparkling rainbow fonts
    Again, unfortunate, but I rather rebuild from ABS with "--enable-infinality=yes" than drop infinality completely.
    Last edited by hokasch (2014-09-01 13:25:32)

  • Why does a smart card reader kill MacOS?

    I need a smart card within a virtual machine on my Mac. The trouble is, every time I connect the reader, my MacOS stops working properly.
    When the smart card reader is connected before the Mac is turned on, then I can't login: After entering the password, it hangs with the spinning color icon.
    I can boot without the reader, though. If the reader is plugged in after boot, this happens:
    Safari doesn't start up, all I see is the color spinner. Finder gets blocked as well while Safari is trying to start up (i.e. forever)
    If I have a Terminal open, then I can "kill -9" the Safari process, which unblocks the Finder.
    When I then try to shut down, it hangs with a white screen, and never properly finishes until power off.
    How can I debug or solve this problem?
    Thanks! Martin

    It's a very common device (Omnikey 3121), which should be compatible. Nevertheless, I installed drivers from the manufactor's site to see if they make any difference. On reboot after driver installation I got a kernel panic within the HID drivers. Very strange.
    Kernel Extensions in backtrace:
             com.apple.iokit.IOHIDFamily(2.0)[994495B5-FB34-3DB5-B47A-D2A732E52F33]@0xffffff 7f811c1000->0xffffff7f81232fff
                dependency: com.apple.driver.AppleFDEKeyStore(28.30)[2A8A5F6B-0A7C-33A0-8E5B-4C10F646EC4F]@ 0xffffff7f811b6000
    After reboot it seems to work fine, but I'll have to check some more.

  • Why does it seem like notify() acts like notifyAll() for threads?

    I'm running a little exercise here:
    class Reader extends Thread {
          Calculator c;
           String name ="Fred";
           static int i = 0;
          public Reader(Calculator calc) {
             c = calc;
             name = "Fred"+(i++);
          public void run() {
             synchronized(c) {
               try {
                  System.out.println(name + " is waiting for calculation...");
                  c.wait();
               } catch (InterruptedException e) {}
               System.out.println("Total is: " + c.total + " for "+name);
         public static void main(String [] args) {
            Calculator calculator = new Calculator();
            new Reader(calculator).start();
            new Reader(calculator).start();
            new Reader(calculator).start();
            try {
                 Thread.sleep(1000);
              } catch (InterruptedException e) {
                   System.out.println("Got interrupted");
            calculator.start();
      class Calculator extends Thread {
         int total;
         public void run() {
            synchronized(this) {
               for(int i=0;i<100;i++) {
                  total += i;
               System.out.println("Notifying start");
               notify();
               System.out.println("Notifying end");
      }the output is
    Fred0 is waiting for calculation...
    Fred1 is waiting for calculation...
    Fred2 is waiting for calculation...
    Notifying start
    Notifying end
    Total is: 4950 for Fred0
    Total is: 4950 for Fred2
    Total is: 4950 for Fred1
    I expect only one "Total is: ..." output to come out since I expect only one thread to wake up from its waiting state from that notify() call. However all three threads wake up. What am I misunderstanding? I thought a thread waits forever unless you pass a time parameter into wait()... or am I wrong?
    Edited by: lapchern on Nov 17, 2009 12:53 PM

    Well, first of all, don't discard Exceptions and then wonder about the behaviour of a program :-).
    But that's not the issue here. From some quick testing, I didn't get the same behaviour when I ran using wait/notify on a lock object, not the thread itself:
    public class WaitNotify extends Thread {
          Calculator c;
         String name ="Fred";
         static int i = 0;
          public WaitNotify(Calculator calc) {
             c = calc;
             name = "Fred"+(i++);
          public void run() {
             synchronized(c.lock) {
               try {
                  System.out.println(name + " is waiting for calculation...");
                  c.lock.wait();
               } catch (InterruptedException e) {
                  e.printStackTrace();
               System.out.println("Total is: " + c.total + " for "+name);
         public static void main(String [] args) {
            Calculator calculator = new Calculator();
            new WaitNotify(calculator).start();
            new WaitNotify(calculator).start();
            new WaitNotify(calculator).start();
            try {
             Thread.sleep(1000);
          } catch (InterruptedException e) {
             System.out.println("Got interrupted");
            calculator.start();
      class Calculator extends Thread {
         int total;
         final Object lock = new Object();
         public void run() {
            synchronized(lock) {
               for(int i=0;i<100;i++) {
                  total += i;
               System.out.println("Notifying start");
               lock.notify();
               System.out.println("Notifying end");
      }Not sure ATM why that is, but it's I think best practice not to lock on the Thread itself and instead a different Object, so there's a fix. It'll give you a place to start investigating.
    Edit: Might be good to look at the [Javadoc for Object.wait()|http://java.sun.com/javase/6/docs/api/java/lang/Object.html#wait()]:
    ...interrupts and spurious wakeups are possible, and this method should always be used in a loop:
         synchronized (obj) {
    while (<condition does not hold>)
    obj.wait();
    ... // Perform action appropriate to condition
    Edited by: endasil on 17-Nov-2009 4:08 PM
    Edited by: endasil on 17-Nov-2009 4:09 PM

Maybe you are looking for

  • C   Runtime error when starting Encore

    I get the following error when starting Encore and it automatically closes: C++ Runtime Error Program C:\Pr... Application has requested runtime to terminate...

  • Embed one project into another (nesting)

    One feature that I would love to have in a slide show software is the ability to embed one project into another. Is this a feature of Keynote? Here is where it would be handy: I was in a band an we needed to put all of the lyrics for our original son

  • Why is the display on my MacBook Pro 2.2 when greyed out unreadable?

    Such as when filling out forms  (as for this forum) I can barely see the letters and nothing of the box outline What I type is readable I have tried adjusting the cohtrast but that does not seem to work Is this a sign of old age? Can it be fixed?

  • From .Mac to .Mac without re-uploading?

    Hi everyone, We are currently hosting a iWeb website on one of my friends .Mac account. He's leaving for work and we would like to transfer the website to my .Mac account. We know that we will need to copy the "domain" file from his computer to mine

  • How to change attributes of HTML table in HTMLDocument

    Hi I am trying to change background of table cell but unsuccessfully. First of all I did not found any suitable method in API so I have to inherit HTMLDocument and make my own public static class ExtendedHtmlDocument extends HTMLDocument { public voi