Posts Tagged ‘ fedora

KDE 4.2 on Fedora 10

So I noticed the Fedora project have pushed out KDE 4.2 after its release at the end of Jan and I have to say, after running the betas for a wee while I’m quite impressed that it was out of the door so quickly after its release. I’ve been hanging out in #fedora-kde on freenode for a couple of weeks to track the progress of the fedora builds prior to the actual release. I doff my cap to those fair chaps for doing a great job packaging the betas and really keeping on top of the releases.

After having set up my .kde settings from 4.1 and then progressing through the betas my .kde folder was unsurprisingly twisted, so this afternoon I cleared it down and re-did my desktops as they were previously.. this is the result…

KDE 4.2

Dropbox + eXtplorer: A better web interface

Ok, so I found myself online at a workstation without admin access the other day and needed desperately to edit a file on my Dropbox account, it was just a plain text file and the edit was only small, so I set about finding a way of doing it, and came up with this as a temporary solution until Dropbox have a fully functional, released API…

preview image

P.S. The error was actually caused by a non-standard character in the filename (+). I’ll be filing a bug with eXtplorer for that :)

Documentation (Wiki) can also be found here.

NOTE: Replace [user] with the username under which the Dropbox folder is located.
NOTE: Replace [FQDN] with either your IP address or the hostname (or FQDN) which you’ll be using to access the interface.

NOTE: This HOWTO assumes that you will be running apache as the user ‘apache’ and that you have already set up your Dropbox account syncing to your /home/[user]/Dropbox folder

To get Dropbox running with apache and extplorer you need to get the following packages:

yum install php httpd

Make the VirtualHost director and get permissions / groups correct:

mkdir /var/www/dropbox
chown apache:apache /var/www/dropbox
usermod -aG [user] apache
usermod -aG apache [user]

Now create and populate an apache virtualhost config file:

vim /etc/httpd/conf.d/dropbox.conf

Populate it with the following text:

NameVirtualHost *:80
    <VirtualHost *:80>
        DocumentRoot "/var/www/dropbox"
        ServerName [FQDN]
        <Directory "/var/www/dropbox">
            allow from all
            Options +Indexes
            AuthType Basic
            AuthName "Dropbox"
            AuthUserFile /var/www/passwd
            Require valid-user
        </Directory>
    </VirtualHost>

Now add a username / password to access your interface via HTTP auth:

htpasswd -cm /var/www/passwd yourusername
chown apache.apache /var/www/passwd

Make sure that apache has full group access to your Dropbox folder.

chmod g+x /home/[user]
chmod g+rw /home/[user]/Dropbox
find /home/[user]/Dropbox -type d -exec chmod g+x {} ;

Download the latest version of eXtplorer from http://extplorer.sourceforge.net/

cd /var/www/dropbox
wget http://heanet.dl.sourceforge.net/sourceforge/extplorer/eXtplorer_2.0.1.zip
unzip eXtplorer*.zip

Check we haven’t made any mistakes and set the services up:

service httpd configtest
service httpd restart
chkconfig httpd on

You can now log into http://[FQDN] using a browser and the default credentials (admin/admin) and set up your user, pointing the user’s “Home directory:” at /home/[user]Dropbox. Once you have set up your user you have the choice to remove the HTTP authentication which we included in the VirtualHost configuration above. Simply comment out (or delete) the following lines from your /etc/httpd/conf.d/dropbox.conf file:

AuthType Basic
AuthName "Dropbox"
AuthUserFile /var/www/passwd
Require valid-user

That’s it, you’re done!

Yum restore script

Ok, so I’m about to do a reinstallation of Fedora (I made a boo-boo which would be easier to fix by a re-install than go through manually and try to fix). I have backups, but not of the lib folders etc, I do however have backups of the uber important folders e.g. /etc /home /root etc. Anyway, I want to do a minimum-fuss reinstall, and decided to write a wee script which would take a list of all my currently installed packages and make a nice simple exectuable bash script so that once I’ve set up the repos on the new system I can simply execute this script, it’ll install all the packages I have now, then I can just restore my /etc/directory on top and hey-presto, I’ll be back to a nicely functioning system.

So without further ado:

#!/bin/bash

INSTALLED=/tmp/yum-installed

LIST=/tmp/list

EXECUTABLE=/home/rob/yum

USER=rob

GROUP=$USER

UNATTENDED_INSTALL=yes #yes/no

cat /dev/null > $EXECUTABLE

sudo yum clean all;sudo yum list installed | awk -F' ' '{print $1}' | sed 1d | sed 1d | sed s/.i386// &> $INSTALLED

exec 3< $INSTALLED

while read <&3

do

echo -n "$REPLY " >> $LIST

done

exec 3>&-

# Create the yum installation script file

if [ $UNATTENDED_INSTALL = "yes" ]

then

OPTION="-y"

fi

echo "#!/bin/bash" >> $EXECUTABLE

echo -n "$REPLY " >> $LIST

echo "sudo yum clean all;sudo yum install $OPTION `cat $LIST`" >> $EXECUTABLE

# Set correct perms

chmod +x $EXECUTABLE

chown $USER.$GROUP $EXECUTABLE

# Cleanup

rm -f $LIST

rm -f $INSTALLED

Obviously edit the vars at the top to suit your setup etc - then just sudo (or execute as root) the $EXECUTABLE