I've been installing Ubuntu on my brother's computer, and since he has never used Linux before I've tried to make things as simple as possible for him to figure out once the computer is turned over to him. One thing I've done is make sure that every program he has been using in Windows is either working in Linux or has a replacement available, and I've put icons on the taskbar for all the most used programs.
During this process I made a shortcut for FCEUltra (NES Emulator) using Zenity and a short bash script. This shortcut doesn't just bring up fceu though.. it uses zenity to display a list of your roms in the directory specified in the bash script, and starts the rom chosen from the list in fceu. Here are the steps:
1.Install zenity and fceu:
Code:
sudo apt-get install zenity fceu
2.Create the bash script that will run when clicking on the shortcut icon:
Code:
sudo gedit /usr/bin/startfceu
Enter the following lines into the file. I've included an option for adding an icon to the zenity window, but it's not needed. I've also included the option for starting fceu in "fullscreen" at 800x600 resolution. Make sure to enter the correct path to your NES roms:
Code:
#!/bin/bash
cd /path/to/nes/roms
GAME=$(zenity --title "FCEUltra - Select a Nintendo game to play" --window-icon=/icon/for/zenity/window --file-selection)
/usr/games/fceu -fs 1 -xres 800 -yres 600 $GAME
3.Make the new file executable:
Code:
sudo chmod a+x /usr/bin/startfceu
You can test this script out now by typing startfceu at the command prompt. The only thing left is to create a desktop icon that points to this new script. Go to Applications -> System Tools -> Applications Menu Editor and create a new shortcut with your chosen name and icon, and make sure the command line says startfceu.
Bookmarks