Automatic Login in Fedora 17

Previously I wrote a post for Fedora 12 on how to setup automatic login.  It looks like this method still works but its much easier now in Fedora 17.

To enable/disable automatic login go to System Settings →Users and click the toggle switch for automatic login.

User Settings

How to Set Automatic Login on Fedora 17

Gnome 3.4 and Fedora 17

Its been awhile since I’ve used Fedora (or Linux at all for that matter), and the main feature that I was interested in testing out was Gnome 3.4.  When Gnome 3 was first revealed in Fedora 16 I gave it a quick try but was unable to use the gnome-shell desktop interface because of the 3D graphics requirement.  However, from the few reviews I’ve read so far, Gnome 3.4 does not require 3D graphics!

Fedora 17 Desktop

Unfortunately though after updating using preupgrade, I was disappointed to see the familiar look of gnome-panel after the first login.  If you happen to experiencing the same problem first I would check to make sure that forced fallback mode is not enabled by going to System Settings→ Details  Graphics.

You can also try running the following command which will return one of either “gnome” or “gnome-fallback.”

$ gsettings get org.gnome.desktop.session session-name

If forced fallback mode is enabled then turn it off through System Settings→ Details  Graphics and try rebooting.  If upon rebooting gnome-shell still fails to start, then try to get gnome-shell to take over with the following command.

(Note: If you forget to use the “&” symbol then you can hit ctrl+z and then enter “bg” into the terminal to pause and then restart the task.  DO NOT forget the “disown” command or gnome-shell will crash when you close the terminal.)

$ gnome-shell –replace &
$ disown

So far I have unfortunately not been able to find a way to get to make gnome-shell the default manager,  and I have to use the above line every time I login to make the switch.  If anyone wants to reply with a solution I would be very grateful.

I’ve also found the following tools, which can be installed through yum, to be very useful in configuring Gnome: gnome-tweak-tool, dconf-editor, gsettings.  If you’re looking to customize fonts and themes I would recommend starting with gnome-tweak-tool.

Preupgrade to Fedora 17

Updating to Fedora 17 using preupgrade is fairly simple, and the instructions are outlined very clearly here on fedoraproject.org.

For all those looking for a quick summary though you can follow the steps below.

Performing the upgrade

Make sure preupgrade is installed by running the command below, and then afterwards run preupgrade to bring up an easy-to-use GUI that will guide you through the next few steps.

$ yum install preupgrade
$ preupgrade

Just click through until preupgrade starts downloading the files needed to perform the upgrade. After preupgrade is finished downloading restart the computer.  When the bootloader pops up select the top line which should read “Upgrade to Fedora 17.”  The next part of the process takes a long time so I would recommend finding something to do for a while.

Cleaning Up

There is a little bit of manual labor involved in cleaning up after running preupgrade.  First remove any orphan packages by getting a list of the packages that need to be removed, and then remove them with yum..

$ package-cleanup --orphans
$ sudo yum remove [package 1] [package 2] ... [package N]

When you’re done removing orphans, you’ll have to clean up some  rpmsave and rpmnew files, which are created when the upgrade isn’t sure how to merge new and old config files. These files can be found with a quick search and can then be compared by using “diff” or “vim”.  Before making any changes I would recommend backing up all of the affected config files in case something goes wrong.

$ locate --regex "rpm(save|new)$"

Here’s an example of how to use diff to compare login.defs and login.defs.rpmnew.

$ diff /etc/login.defs /etc/login.defs.rpmnew

Ubuntu 11.04 Convert Movies for Ipod

Its been a while since I’ve tried to install some movies on my Ipod, and the way I used to do it doesn’t work anymore!  I’ve already installed the beta of Ubuntu 11.04, and everything seems to work fairly well.  However, I couldn’t find support for faac for the audio codec, but I was able to use aac with the -strict experimental option.

To rip the DVD, I found the AcidRip DVD Ripper and the Arista Transcoder programs to work fairly well, but when they converted the movie for the ipod (in either mp4 of m4v format) it didn’t work.  I had to use ffmpeg instead to convert the video .  Here is an example for the movie Inglorious Bastards.  I looked up the requirements on Apple’s website for the video format on an Ipod, and this command worked successfully.  After converting the video I was able to use Banshee to load the video onto my Ipod.

ffmpeg -strict experimental -i inglourious_basterds.avi -f mp4 -vcodec libxvid -s 320×240 -b 600k -r 30 -acodec aac -ar 48000 -ab 160k Inglorius\ Bastards.mp4

Apple specified the following requirements for the video format on their website:

  • H.264
    File formats: .m4v, .mp4, and .mov
    Video: Up to 768 kbits/sec, 320 x 240, 30 frames per second (fps), Baseline Profile up to Level 1.3.
    Audio: AAC-LC up to 160 kbits/sec, 48 Khz, and stereo audio.
  • MPEG-4
    File formats: .m4v, .mp4, and .mov
    Video: Up to 2.5 Mbits/sec, 480 x 480, 30 fps, Simple Profile.
    Audio: AAC-LC up to 160 kbits/sec, 48 Khz, stereo audio.

Passwords and Encryption Keys Fedora 13

The program Passwords and Encryption Tools can be used to create and manage SSH and PGP keys.  It can be accessed from the menu bar by going to Applications ->  Accessories -> Passwords and Encryption Keys, and provides a nice way to manage encryption keys in perhaps a more user friendly manner; although everything done using this tool can also be accomplished in the terminal.

In Ubuntu, encryption keys created using the Passwords and Encryption Keys program can be used to encrypt files by right clicking on them and selecting Encrypt, but apparently this option is not available in Fedora 13 (At least I don’t seem to have it).

Creating a New PGP Key

Before encrypting files and mail, a new PGP key must first be created, unless you already have one, by going to File -> New.  Select PGP Key and then select continue.  Enter in your full name, email address, and a comment if you choose to.  Under the advanced key options, the encryption method and other encryption settings can be modified if you know what you’re doing.  By default the key will be created using RSA encryption.

When you’re ready, select create at the bottom of the screen.  A screen will pop up and request the pass-phrase for the key.  Enter in the pass-phrase and then hit next.  It will take a few moments for the key to be generated.

This creates both a public and private key.  The public key can be sent to anyone, and is used for encrypting files.  The private key should not be shared with anyone and hidden in a safe place.  It is used for decrypting files.

Encrypting Files With Your PGP Key

Encrypting files and folders can be done by using the gpg command.  However, only files can be encrypted using gpg.  To encrypt a folder, use the tar command to create a gzipped tar file, and then encrypt the compressed tar file.  To get started, open up a terminal and enter in the command below:

gpg --list-keys

This will list all of your PGP keys, but the public key id can also be found on the right side of the Passwords and Encryption Keys window.  Take note of the key id for the public key you just created.    To encrypt a file run the following command, where [key id] is the id of your public key and [file] is the file you wish to encrypt:

 gpg --default-key [key id] --encrypt [file]

Make sure any files that are encrypted are not stored with the private key, or this would defeat the purpose of encrypting a file since the private key is used for decryption.

To decrypt a file run the following command:

gpg --output [output file name] --decrypt [encrypted file].

Encrypting Mail Using Thunderbird

In order to encrypt mail messages, Thunderbird requires the enigmail addon, which can be downloaded through yum.

sudo yum install thunderbird-enigmail

Once enigmail is installed, open up Thunderbird.  In the menu bar should be a new drop-down menu titled OpenPGP.  Go to OpenPGP – > Setup Wizard.  Read through the next few screens carefully, and follow the steps.  Everything is fairly straight forward, and there should be no difficulty in setting things up.  Eventually a prompt will require the encryption key, and the one that was previously created can be chosen or alternatively a new one may be created.  At the end of the setup process it will be possible to sign and encrypt all email messages through Thunderbird.

Installing Xfoil on Fedora 12 Linux

These are the steps that I went through to build Xfoil using double point precision on Fedora 12.  I used the gcc and gfortran compilers, and if you choose to use different ones, then some of the compiler flags may be different.  Before trying to build Xfoil, run the command sudo yum groupinstall “Development Tools”.  Not everything downloaded from the development group is needed to install Xfoil.  Alternatively, you can try to individually install the certain packages that are needed just to build Xfoil.

To get started first download the source file from http://web.mit.edu/drela/Public/web/xfoil/.  Extract the source tar file, cd into the directory Xfoil, and then follow the steps below.

Step 1 – Build the Orrs-Summerfield Database

Use cd to switch into the Xfoil/orrs/ directory and then run pwd.  Copy the ouput from pwd, and then cd into the src/ directory.  Edit the file osmap.f and look for the line DATA OSFILE / ‘/var/local/codes/orrs/osmap.dat’ /.  Change this line to DATA OSFILE / ‘{Output from pwd}/osmap.dat’ /, where {Output from pwd} is what was just copied before.

Now run cd ../bin/ and edit the make file, MakeFile_DP.  Make the following changes to that file.

  1. Change FC = f77 to FC = gfortran.
  2. Change FLG = -O -r8 to FLG = -O -fdefault-real-8 -fdefault-double-8.
  3. Look for the line #  Uncomment for Intel Fortran Compiler, and then comment out everything related to the Intel compiler.

Then run the following commands:

[brad@localhost ~]$ make -f Makefile_DP osgen
[brad@localhost ~]$ make -f Makefile_DP osmap.o
[brad@localhost ~]$ cd ..
[brad@localhost ~]$ bin/osgen osmaps_ns.lst

Step 2 – Build the Plot Library

Use the cd command to switch to the Xfoil/plotlib/ directory.  Open up the make file and then make the following changes.

  1. Find the line PLTLIB=libPlt.a.  Comment out this line and uncomment the line below it, which should read PLTLIB = libPltDP.a.
  2. Find the section Default compilers and flags, install commands, and change the default compilers by setting FC = gfortran and CC = gcc.
  3. Find the line DP = -r8 and replace it with DP = -fdefault-real-8 -fdefault-double-8.  Make sure it is uncommented.
  4. Comment out the line include ./config.make.

Save and close the make file, and then run the make from the terminal.

Step 3 – Make Programs in /bin

Now switch to the Xfoil/bin/ directory, and open up the make file.  Then make the following changes.

  1. Set the BINDIR equal to /usr/local/bin (BINDIR = /usr/local/lib).
  2. Find the line PLTOBJ = ../plotlib/libPlt.a and comment it out.
  3. Find the line ###  Default compilers and flags.
  4. Change FC = f77 to FC = gfortran.
  5. Change CC = cc to CC = gcc.
  6. Comment out the FFLAGS and FFLOPT variables.
  7. Look for the line ### Intel Fortran Compiler, and then comment out the next few lines for this compiler.  They are not needed.
  8. Find the line ###Double precision option.
  9. Change FFLAGS  = -O -r8 -CB to FFLAGS  = -O -fbounds-check -fdefault-real-8 -fdefault-double-8.
  10. Change FFLOPT  = -O -r8 -CB to FFLOPT  = -O fbounds-check -fdefault-real-8 -fdefault-double-8.
  11. Comment out the second set of FFAGS and FFLOPT.  These variables only need to be set once.

If you try to compile at this point you will get most likely get the following error.

gfortran -c -O -fbounds-check -fdefault-real-8 -fdefault-double-8  ../src/xoper.f
../src/xoper.f:117.22:

IINPUT(I) = 2**31
1
Error: Arithmetic overflow at (1)
make: *** [xoper.o] Error 1

There are two errors in the source code that need to be fixed.  The first one is in the file pplot.f and the second one is in the file xoper.f.  Running the following commands should fix these problems.  Note that before running the sed commands you want to be in the Xfoil/src/ directory.

[brad@localhost Xfoil]$ cd src/
[brad@localhost src]$ sed -i ‘s/LOGICAL ERROR, LGETFN/LOGICAL ERROR, LGETFN, LERR/g’ pplot.f
[brad@localhost src]$ sed -i ‘s/IINPUT(I) = 2\*\*31/IINPUT(I) = HUGE(0)/g’ xoper.f

Then change back to the Xfoil/bin/ directory and run make.

[brad@localhost bin]$ make xfoil
[brad@localhost bin]$ make  pplot
[brad@localhost bin]$ make pxplot

After I compiled everything, the xfoil command was not moved into /usr/local/bin.  This can be done manually by running sudo cp xfoil /usr/local/bin/.

Installing AVL on Fedora 12 Linux

These are the steps that I went through to get AVL running on Fedora 12.  I used the gcc and gfortran compilers.  If you choose to use different ones, then some of the compiler flags may be different.  Before trying to build AVL, run the command sudo yum groupinstall “Development Tools”.  Not everything downloaded from the development group is needed to install AVL.  Alternatively, you can try to individually install the certain packages that are needed to build AVL, but if one package is missed then it could cause an aggravating headache later on.

To get started first download the source file from http://web.mit.edu/drela/Public/web/avl/.  Extract the source tar file, cd into the directory Avl, and then follow the steps below.

Step 1 – Build XPlot 11

The first step is to build the XPlot11 library.  Change the current directory to plotlib/ and edit the file MakeFile.  Then make the following changes.

  1. Find the line PLTLIB=libPlt.a.  Comment out this line and uncomment the line below it, which should read PLTLIB = libPltDP.a.
  2. Find the section Default compilers and flags, install commands, and change the default compilers by setting FC=gfortran and CC=gcc.
  3. Find the line DP = -r8 and replace it with DP = -fdefault-real-8 -fdefault-double-8.
  4. Comment out the line include ./config.make.

Save and close the make file, and then run the sudo make from the terminal.

Step 2 – Build the Eispack Library

Now change to the eispack/ directory.  Open up the make file and make the following changes.

  1. Change the compiler to gfortran by commenting out the current line, FC = f77, and placing below it FC = gfortran.
  2. Change FLG = -O to FLG = -O -fdefault-real-8 -fdefault-double-8.

Save and close the file and then run sudo make.

Step 3 – Build AVL

Open up the Makefile in the bin/ directory and make the following changes.

  1. Set the BINDIR  equal to /usr/bin.
  2. Change libPlt.a to libPltDP.a.
  3. Change FC = f77 to FC = gfortran.
  4. Change the compiler flags from FFLAGS = -O -r8 to FFLAGS = -O -fdefault-real-8 -fdefault-double-8.
  5. Comment out all of the Intel Fortran Compiler 8.x options.

Save the make file and then run sudo make avl.  When I ran this it did not copy the bin file, avl, to /usr/bin/.  After it compiles this can done manually by running sudo cp avl /usr/bin/.

Try running an example to see that everything works.  In the Avl folder open up the file session1.txt and follow along.