Installing Dropbox on Mandriva 2010.2 KDE

April 4, 2011 Reading time: 2 minutes See Comments

Dropbox is a great idea, and has Linux support, the only problem is that it currently only supports the Nautilus file manager (Gnome). I thought this wouldn’t be such a problem so I loaded it using "urpmi dropbox" in the console or you could use “Install & Remove Software”. The Dropbox icon can then be found on the “Internet” menu.

It all appeared to work perfectly, Dropbox downloaded its binary file and then I entered my account details and all was good. (Note: You may need to start Dropbox a second time before it downloads the binary, not sure why that was).

Dropbox places an icon in the system tray, clicking on it opens Nautilus and shows you your files. You can add/update and edit your files and it all just works. I thought OK I’ll just use Nautilus for Dropbox and all is good.

Then I plugged in my USB stick and noticed that the Device Notifier was no longer working properly, it was now calling Nautilus instead of Dolphin and not opening the USB devices properly. That wouldn’t do, so this is how I fixed it…

First I removed the Dropbox and Nautilus RPMs using “urpme nautilus-dropbox nautilus gnome-desktop-common libgnome-desktop-2_17 libexempi3″ in the console. This leaves the dropboxd binary file that was downloaded when I ran Dropbox so I can just use that to do what I need. Next from the menu go to “Tools->System Tools->Configure Your Desktop”, click the “Advanced” tab and then double click the “AutoStart” icon. You’ll probably find like I did that the Dropbox entry is still there (If not you’ll need to create one). Click on the Dropbox entry and then click the Properties button, on the Application tab replace the Dropbox command which will be something like “dropbox start -i” with “~/.dropbox-dist/dropboxd” (without the quotes). Logout and Login again.

Now when I start KDE the Dropbox icon automatically shows up in the system tray and even better if you click it now it opens Dolphin and not Nautilus. My Device Notifier also returned to normal. All is good :)

See Comments

Setting up a C++ Development Environment on the Pandora

June 24, 2010 Reading time: 2 minutes See Comments

I wanted to set up the Pandora so I could develop C++ programs directly on the unit rather than using a cross compiler.  I am also installing the SDL & OpenGL ES libraries. Until a PND package is produced this is what I have done to install the development libraries. You need to use a terminal to issue the following commands and then either issue these commands prefixed by sudo or login as root using su.

# opkg update

Update is important to do first to make sure the package lists are up to date. Under no circumstances do a opkg upgrade, trust me on this. If you do be ready to do a firmware re-flash.

# opkg install gcc gcc-symlinks gcc-doc make make-dev binutils-dev
# opkg install cpp cpp-symlinks
# opkg install g++ g++-symlinks libstdc++-dev
# opkg install libgles-omap3-dev
# opkg install libsdl-1.2-dev libsdl-gfx-dev libsdl-image-1.2-dev libsdl-net-1.2-dev libsdl-ttf-2.0-dev

OK, this is the tricky one, OpenPandora have patched the libsdl-mixer library, so there is no equivalent -dev library, for the mean time I am forcing the installation of the Angstrom library, you will notice the nodeps flag. So far I haven't seen any problems with doing this, your mileage may vary. I will be coding an application that uses sound (portable music player) so we'll see how it goes.

opkg nodeps install libsdl-mixer-1.2-dev

You can write your code using nano or vi in the console or use the GUI application Mousepad. I suggest creating a directory for programming on your SD card. Then in a console you can compile and run your applications. In a follow up post I will show how to write a Hello World program on the Pandora using some SDL and C++.

Have Fun :)

See Comments

NIS/NFS Networking with Mandriva 2010

March 9, 2010 Reading time: 6 minutes See Comments

I recently setup a network using NIS & NFS with Mandriva Linux (Running KDE) as the server and workstation OS. I chose to have Linux installed on each workstation (rather than using LTSP), as the machines are reasonable in specifications.

When completed the workstations now show the list of users on the login screen. Users can login to any of the workstations and get their desktop complete with all their settings (background, themes, email setup, etc). This makes for a very flexible setup where if one workstation fails the user can simply logon somewhere else until the workstation is fixed. It also means that all user data and configuration is stored centrally on the server.

Server Setup

These instructions refer specifically to Mandriva 2010 (or Mandriva 2009) but the setup would be very similar for other Linux flavours. You should open a console as root or su to root to issue these commands. I use ‘vi’ to edit the configuration files but you could also use ‘nano’ or ”kwrite’ if you like.

Install the packages: ‘ypserv’ and ‘rpcbind’ (or ‘portmap’ for Mandriva 2009):

# urpmi ypserv rpcbind

Make sure that the services are set to start on bootup:

# chkconfig –level 345 ypserv on
# chkconfig –level 345 rpcbind on (or portmap for Mandriva 2009)

Set the domain name (not the internet domain name, just the NIS domain name used internally). I just used “server” for simplicity :-

Add “NISDOMAIN=server” to the end of the “/etc/sysconfig/network” file.
Issue the command “domainname server”

(Note that I do both of the above as I noticed that just using the domainname command worked but seemed to be forgotten later. To check that your domainname is still set just issue the “domainname” command with no parameters).

Make the user home directory mount point. I use /export/home rather than /home to save confusion later on:

# mkdir -p /export
# mkdir /export/home

If you have existing accounts in /home on the server that you wish to move to /export/home:

# mv /home/fred /export/home (Move Fred’s account)

For all moved users edit the /etc/passwd to set the new path. Note that I set all “exported” user ids to 600 or over so that we can selectively export only the users over 600 and excude the local users from 500 to 599

ie. fred:x:600:600:Fred Flintstone:/export/home/fred:/bin/bash

Create (or add to) the /etc/exports file. The following example assumes you are using the 192.168.1.x network. The first line exports the home directories of all users, the following optional lines show how to export a few other shared directories if needed:

/export 192.168.1.0/24(rw,no_root_squash,no_subtree_check,sync)
/data/public *(no_all_squash,sync,secure,rw)
/data/office *(no_all_squash,sync,secure,rw)
/data/admin *(no_all_squash,sync,secure,rw)

Make the NIS maps. This also needs to be run after adding, changing or removing users. Note that I set MINUID and MINGID to 600 in the /var/yp/MakeFile so that users 500 to 599 are not shown:

# cd /var/yp
# make

That’s the server configuration complete. You can now add new users if required, when adding them set their home directory to /export/home/{username} (you may need to mkdir the directory before adding the user) and their userid/groupid to 600+. You can now either start the required services (ypserv, rpcbind, portmap) or just restart the server and you’re ready to go.

Client Setup

Install the packages ‘ypbind’, ‘autofs’ and ‘rpcbind’ (or ‘portmap’ for Mandriva 2009):

# urpmi ypbind autofs rpcbind

Make sure that the services are set to start on bootup:

# chkconfig –level 345 ypbind on
# chkconfig –level 345 autofs on
# chkconfig –level 345 rpcbind on (or portmap for Mandriva 2009)

Set the domain name (not the internet domain name, just the NIS domain name used internally). I just used “server” for simplicity :-

Add “NISDOMAIN=server” to the end of the “/etc/sysconfig/network” file.
Issue the command “domainname server”

Add nis to the following entries in /etc/nsswitch.conf as follows:

passwd: nis files
shadow: nis files
group: nis files
automount: files nis

Add to end of /etc/yp.conf:

ypserver 192.168.1.2 (Use your servers IP address here)

Add to end of /etc/autofs/auto.master:

/export auto.export –timeout 30

Create auto.export with the contents:

home -fstype=nfs,rsize=8192,wsize=8192,nosuid,nolock 192.168.0.2:/export/home
mkdir -p /export

Finally switch off auto-login (if enabled) in Control Centre.

See Comments

Mandriva 2010.0 and Cedega CD/DVD Detection

November 29, 2009 Reading time: ~1 minute See Comments

Having recently upgraded to Mandriva 2010.0, I also wanted to give Cedega a go, so I loaded up the latest Cedega and found that certain CDs and DVDs were not recognised. They would load OK but would not run, failing the “copy-protection” test in Cedega Diagnostics. The game in this case was Oblivion which installed fine but would not run.

I found that I had to manually add an entry to the end of /etc/fstab file, to specifically set the CD/DVD options:

# Entry added to allow Cedega copy-protection test to work.
/dev/sr0 /mnt/cdrom iso9660 user,unhide,noauto,ro 0 0

You will need to replace “/dev/sr0″ with the actual location of your CD/DVD drive. You can check where the /dev/cdrom and /dev/dvd links point to get this information. I’d imagine that in most cases “sr0″ will be correct.

Strangely enough the same set up on a notebook worked perfectly without any changes to the fstab file. So it’s obviously only certain hardware configurations that need this change.

See Comments

TRS-80 Emulator for Linux

January 27, 2009 Reading time: 3 minutes See Comments

I got a little nostalgic when my son started writing a game in Fenix that looked a lot like Robot Attack (Even though he's never seen it). So I thought I'd show him the original, but rather than try and setup the old System 80 (TRS-80 clone from DSE) I decided to use an emulator.

I've used Tim Manns excellent TRS-80 emulator xtrs before which I remember worked well. Unfortunately when trying this now it seems that Linux has evolved a fair bit and as a result I noticed a few issues when running xtrs.

  • xtrs would not work on my new distro without removing the -DHAVE_SIGIO from the makefile. (See Tims page for details on this).
  • Sound on xtrs would not work unless I stopped or removed the pulseaudio process.
  • To allow -autodelay to work on xtrs I had to remove the optimizations from the compiler (-O0).
  • Keyboard input tends to be flakey on newer distros also.

After a little research I came across sdltrs which is based on xtrs. The benefit of using the sdl version is that it works around the problems associated with new linux distros. Many thanks to Mark Grebe for his work on this.

So here's a summary of what I did to get sdltrs running:

  • Download the tarball from the Browse SVN under the Code menu
  • Extract the tarball tar zxvf src.tar.gz
  • cd src, cd linux, make
  • this will create a sdltrs binary file, you just need to execute this, enter ./sdltrs
  • I created a new directory with sdltrs, the level2.rom file and various disk files.
  • Once sdltrs has booted the level2.rom press F7 for configuration options.
  • Put a disk operating system into the Disk 1 slot (ie NEWDOS 80)
  • Press F10 to reset the system and it should boot the disk.
  • For those a little rusty like me try DIR :0 to show contents of disk 1 and DIR :1 for disk 2.

Works Great :)

See Comments

Wireless LED on Notebooks

December 30, 2007 Reading time: 2 minutes See Comments

Wireless

Having just installed Mandriva Powerpack 2008 (and it is very good by the way, you can buy it at http://www.divtech.com.au), I found that all the hardware of my notebook was automatically identified and worked perfectly. With the exception of the wireless LED. I have the Intel Centrino using the ipw2200 driver, the wireless works perfectly but the LED according to the documentation is an experimental option.

In order to activate it I only had to add the line “options ipw2200 led=1″ to the /etc/modprobe.conf file. I used “vi” in order to do this (you need to have root privileges). Alternatively if you want a graphical way to do it go into “Configure your Computer”, its on the quick launch bar in Mandriva 2008, select “Hardware”, the “Browse and Configure Hardware”, the hardware list will then be compiled and displayed.

In the list you should find a category called “Ethernet Card” and as a sub-category to that you will see your wireless card listed (something like “PRO/Wireless 2915ABG” or similar). Select the card and in the right hand windows click on “Set current driver options”. The windows that comes up will show all the parameters to the ipw2200 driver, scroll down to find the “led” parameter and enter “1″ into the textbox. Click “OK” to save. You can then exit the control centre. You will probably need to reboot to activate the LED function. Even though the LED option is experimental it seems to work fine for me.

I would appreciate your feedback if you have comments, corrections or additions to this article, Thanks.

See Comments