A Scientific Desktop

I made Fedora 16 my main desktop for 3 weeks… and I was pretty impressed. If only it didn’t come with that bloody awful Gnome Shell user interface! Yup, I know you can switch to fallback mode; or install any number of completely different desktop environments… but I’ve decided I really just want my Gnome 2 desktop back, on a stable, rpm-based distro. At least until Gnome Shell is rendered productive and usable.

So I’ve decided to go with Scientific Linux 6.1 as my desktop of choice. It’s not exactly glitzy, but it can be made to do everything I need. Here’s my recipe for a usable Scientific Linux desktop, with all mod-cons. I use a 64-bit O/S and an NVidia graphics card, and the mix of applications I install are obviously tailored to what I use my PC for. If something is ‘missing’ therefore, it’s simply because I don’t use it myself and therefore have no need to install it.

The steps need to be taken in the order described (i.e., there’s some dependencies between them, so doing something out of sequence might not work). Nearly all commands are issued as root and using the command line (so su – root before you start!) It took me 5 hours to finish everything the way I like it, but most of that was spent waiting for things to download, so a faster Internet connection than mine will make a big difference.

1. Preliminaries

As root, run the following commands in sequence, noting that the reboot is essential where shown:

yum -y update
[reboot]
yum -y install gcc make binutils kernel-devel kernel-headers
yum -y install install rpmforge-release

2. Switch to LibreOffice

There’s nothing really wrong with sticking with the default OpenOffice.org installations, but all the developer action these days is with the LibreOffice fork (thanks to Oracle annoying nearly everyone!) So I prefer to switch between the two freebie office suites, as follows. Note that all commands are issued as root, sitting in the /root directory.

First, download the LibreOffice software (you can use any mirror or go via the official website if you prefer. I use aarnet.edu.au simply because my downloads from there are unmetered)

wget http://mirror.aarnet.edu.au/pub/libreoffice/stable/3.4.4/rpm/x86_64/LibO_3.4.4_Linux_x86-64_install-rpm_en-US.tar.gz
wget http://mirror.aarnet.edu.au/pub/libreoffice/stable/3.4.4/rpm/x86_64/LibO_3.4.4_Linux_x86-64_helppack-rpm_en-US.tar.gz

Now unpack the two downloads and tidy up:

tar -xvf LibO_3.4.4_Linux_x86-64_install-rpm_en-US.tar.gz
tar -xvf LibO_3.4.4_Linux_x86-64_helppack-rpm_en-US.tar.gz
rm *.gz

Now to get rid of the original OpenOffice suite:

yum remove openoffice*

Now to install the LibreOffice components:

cd LibO_3.4.4rc2_Linux_x86-64_install-rpm_en-US/RPMS
yum -y install *.rpm --nogpgcheck
cd desktop-integration
yum -y install libreoffice3.4-redhat-menus-3.4-402.noarch.rpm --nogpgcheck
cd
cd LibO_3.4.4rc2_Linux_x86-64_helppack-rpm_en-US/
yum -y install *.rpm --nogpgcheck

There are three installations here: the main suite, the bit of software that gives you nice menu items to launch the various suite applications (called ‘desktop-integration’) and the Help components. Do all three, in the order shown and the job is done. Once you’re finished, the two LibO… directories in /root can be deleted using, say, Nautilus.

3. Add Some Additional Repositories

To finish off everything else in this article, the standard Scientific Linux repositories are not enough. You’ll need to add a couple of new ones, which you do as follows. Begin as root by doing a cd to /etc/yum.repos.d and issue the following commands:

rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm
touch google-chrome.repo
gedit google-chrome.repo

Add the following lines to the new text file, then save:

[google-chrome]
name=google-chrome - 64-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

4. Install the Google Chrome Browser

If you prefer to stick with Firefox, that’s fine. I prefer to use Google Chrome these days. So I do this as root:

yum -y install google-chrome-stable

5. Install Nvidia Drivers

If you use ATI graphics cards, you’ll not need these particular instructions. You can similarly skip this section if you’re happy with the default, open source graphics drivers installed with your O/S by default. But I use NVidia graphics cards and I prefer the proprietary drivers over the open source “nouveau” ones. It used to be a royal pain getting the proprietary drivers installed; these days, as root, you simply issue the command:

yum install kmod-nvidia

And then you reboot.

When the PC comes back up, this command should return nothing at all (proving that the nouveau drivers are no longer in use):

lsmod |grep nouveau

If you need to configure twin monitor setups, you can now run this command as root:

nvidia-settings

Fiddle with your X server settings and get the correct monitors enabled in twinview mode (and make sure to mark the correct one as the primary monitor). Save the results of your fiddling, when you’re ready, to the existing xorg.conf file. By default, I find the top and bottom panels are always displayed on the secondary monitor, but a simple logout and log back in corrects this.

6. Install More Applications

Now your graphics are right and extra repositories are enabled, a bunch of additional applications can be installed successfully. To start with, a bunch of fripperies:

yum -y install gimp gnome-games gnome-games-extra libdvdcss transcode dvdbackup vlc easytag gstreamer-plugins-ugly mozilla-vlc mencoder soundconverter

I usually also want to install Stellarium at this point. It’s available in the repositories we’ve just added -but, at the time of writing, the version available doesn’t play nice with (at least) the Nvidia drivers we’ve just installed. So you can’t install it with a simply ‘yum install…’ command, and instead need to follow the instructions I have written up here.

Next, Dropbox. Visit http://www.dropbox.com/install?os=lnx and download and install the Fedora RPM. (Yes, I wish they had a proper Centos/RHEL repository, too). Once that’s done, you then (as yourself, not as root) click Applications -> Internet -> Dropbox to run the Dropbox application and allow it to download the ‘proprietary daemon’.

Once that’s been done, you will need to edit /etc/fstab as root and add user_xattr to the mount options for the /home folder. You end up with this sort of thing:

/dev/mapper/vg_dirac-lv_home /home ext4 defaults,user_xattr 1 2

…instead of just

/dev/mapper/vg_dirac-lv_home /home ext4 defaults 1 2

…spot the one additional bit there! Note that this edit is not compulsory -Dropbox works fine without this, synching perfectly normally. But full Dropbox functionality only comes after this edit -basically, without it, you don’t get a big green tick displayed next to the Dropbox folder in Nautilus when everything’s synch’d properly.

Note that installing the Fedora version of Dropbox will break your ability to update anything via yum after this. To restore yum functionality, you need to edit /etc/yum.repos.d/dropbox.repo. I would personally disable the repository completely: the installed software works as it is and a future Fedora-oriented update of the software might break it. On the other hand, maybe the future updates are crucial to plugging some security hole… who knows?

So, if you want to disable all future updates, just add

enabled=0

…to the end of the repository file.

If you’re prepared to risk future updates, however, change the baseurl line so that instead of having a reference to …/$releasever/, it just says …/fedora/14/ (i.e., hard-code the version of Fedora rather than having it picked up -incorrectly, as far as Dropbox is concerned- via an environment variable).

Third, we can install KeepassX, for all your password management needs. Just visit http://elders.princeton.edu/data/puias/6/x86_64/os/Addons/keepassx-0.4.3-1.puias6.x86_64.rpm and download and install the KeepassX rpm.

Now that you can open your Keepass file from the Dropbox directory, you can log in to Gmail and the like and set up synching correctly. Remember to set ‘never save passwords’ for added security (and inconvenience!)

Fourth, install Handbrake, for all your DVD and Blu-Ray ripping needs. Visit http://pkgrepo.linuxtech.net/el6/release/x86_64/handbrake-gui-0.9.5-1.el6.x86_64.rpm and download and install the Handbrake GUI rpm. A bunch of dependencies will get pulled in automatically, but otherwise everything should just work.

Fifth, if you want the best e-book manager in the business, issue this command (as root) to install the Calibre e-book management suite:

python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read(); main()"

When it tells you at the command prompt to type ‘calibre’ to run the program, don’t bother: just click Applications -> Office -> Calibre (as yourself, not as root) to run the thing and fill in its first-time wizard prompts.

Sixth, although it would be nice to avoid doing so if possible, you will probably want or need to install the Adobe Flash plugin for Mozilla (some Youtube clips won’t play otherwise, even in Google’s Chrome). So head to http://get.adobe.com/flashplayer/otherversions/ and download the 64-bit “other Linux” rpm and install that. Although the website will say it’s for “Firefox”, it will actually get Chrome working, too.

Seventh and last, if you still need some Windows capability (or want to test out other Linux distros in safety), VMware Workstation makes for a very capable virtualisation platform (better, in my opinion, than the free VirtualBox alternative). At US$199, it’s not cheap, but it’s worth it.

Once you’ve downloaded the appropriate VMware software bundle, install it as root by issuing the command:

sh VMware-Workstation-Full-8.0.1-528992.x86_64.bundle

(The specific version numbers in the filename bit of that might be different by the time you read this, so improvise as necessary!) So long as you’re using version 8, that’s all there is to it -no additional scripts or anything to run. As yourself, not as root, you’ll immediately be able to click Application -> System Tools and launch the Workstation application.

7. Networking

The default firewall settings block Samba traffic, so browsing a Windows network will be impossible. Use System -> Administration -> Firewall to tweak this: either disable the firewall completely or simply tick the Samba and Samba Client items as trusted services. Then click Apply.

To mount a remote Windows share in read-write mode, add the appropriate lines to /etc/fstab (editing it as root, of course). In my case, I’ve two shares I want mounted in two different places, as follows:

//192.168.0.100/public /safedata/public cifs username=hjr,password=xxxxx,dir_mode=0777,file_mode=0777,iocharset=utf8 0 0
//192.168.0.100/hjr /safedata/hjr cifs username=hjr,password=xxxxx,dir_mode=0777,file_mode=0777,iocharset=utf8 0 0

This requires the mount points to be created ahead of time, of course.

Test that you’ve got the syntax right by doing (as root):

mount /safedata/public

…and

mount /safedata/hjr

If they mount correctly, you can reboot. The shares will be auto-mounted at every subsequent reboot.

8. Mounting NTFS USB drives

Samba will allow you to read networked drives just fine, regardless of their underlying file system. But if you directly attach storage to your Scientific desktop PC (plugging in a USB drive, in other words), then you won’t be able to mount it -or have it auto-mounted- if it’s formatted with NTFS. Not unless you run this command as root first, that is:

yum -y install ntfs-3g

9. Change the GDM Login Wallpaper

The default wallpaper for Scientific Linux 6.1 is pretty ordinary -but at least it’s easily changeable with a quick right mouse-click and a ‘Change Desktop Background’. Unfortunately, the same bland wallpaper is the background for the Gnome Display Manager (GDM) login window -and there’s no simple way of changing that.

Here’s the workaround, though:

As root, save your desired login background to /usr/share/backgrounds. It needs to be a jpg. Then issue this command:

cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow

Now log out. That last command will cause the Appearance configuration application to appear every time you reach the login screen. Click the Background tab and then the Add button. Navigate through the /usr/share/backgrounds directory to find the image you saved there earlier. Select it, and the login screen background should immediately change to match:

Of course, you won’t want to be prompted for a new background again and again! To stop the Appearance tool appearing on future logins, just issue this command (as root):

unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

6 thoughts on “A Scientific Desktop

  1. Maurice

    I did most of the above and, on my next start, my SL 6.2 stalled, requiring a hard switch off and a complete reinstallion. Need less to say I was not impressed.

    Reply
  2. Maurice

    Further to my recent comment I should mention that I use the 32 bit SL but that should not make any difference should it?

    Reply
  3. dizwell Post author

    No, it shouldn’t, but it means I can’t be 100% certain about it because we’re not doing the same things precisely.

    When you say you did “most” of the above, which bits didn’t you do? I’m thinking, for example, that graphics are a definite “problem area”, so maybe you shouldn’t have done what I suggest in that bit… or maybe that’s a complete red herring.

    All I can really say is that SL=Centos=Red Hat (give or take a very, very little), so SL will be one of the sturdiest platforms you can run. The trouble really only starts when you ‘degrade’ one of these Enterprise distros by trying to turn it into a desktop O/S -adding additional repositories is notoriously asking for trouble in some respects, for example. Even when I follow all my own instructions above, for example, I can run into ‘repository hell’, since elrepo doesn’t always play nice with all the other repos that might or might not be enabled. (But usually, you’d know that at the point of installing something, not at the point of a reboot).

    I suppose I could also add: any reason for 32-bit? Ancient PC, fair enough… but anything vaguely modern and with about 2GB+ RAM, well… I’d think 64-bit ought to be the way to go.

    Other than that, do it bit by bit, with lots of reboots in between. When you’re degrading an enterprise distro like this, a lot *could* go wrong. Taking it a step at a time would at least help you narrow down where it does.

    Sorry you’ve had a bad experience, though. Like Linux generally, it has its rough edges, but failing to reboot isn’t generally one of them, and I’ve never had that experience just by doing what’s described in the article (I’ve certainly screwed things up by doing other stuff, but not what I wrote about!)

    Reply
  4. sam

    I too want to go scientifique linux, only a small problem, I believe it is a minor one because I do not see it it raised any where when I google, but I just do not know how to. I format my usb sticks to ext4. What should I do have them displayed when they are mounted in scientific Linux 6.2? I have the same issue with centos. I have grown up in debian world that doesn’t pose this problem.

    Reply
    1. sam

      The above problem was due to permissions. Resolved. Trying to play around with scientific linux, thanks for information on repositories.

      Reply
  5. Tom Curl

    Please say how you resolved the “permissions” problem. When I install a LabVIEW USB device I can connect to it fine as root, but not as an ordinary user.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>