1 0 Tag Archives: rpm

Using Synergy with YellowDog Linux 6

Hi Everyone,

The title says it all. This is for people who use their monitor with the Playstation3 and especially for those, who develop using the PS3. Now, I have a single monitor where I have both my PS3 and my computer attached through a Tuner and a VGA connection respectively. Starting development with the PS3 and not having my LAN and computer around would have created so many problems for me. Furthermore, I already have a jungle of wires behind my PC cabinet and I did not want to add a KVM switch and two more hardware peripherals for the PS3. I needed a software solution to this and Remote Desktop/VNC would not do it for me, since my PS3 is already connected physically to my monitor. This is where this amazing app called “Synergy” comes into play.

What is Synergy?
Synergy is a software KVM switch. If you do not know what a KVM switch is, you can read this article. A typical KVM switch allows you to use a single set of hardware devices to work with two or more machines, which can be on different Operating Systems. You can learn more about Synergy on its homepage here. I don’t want to explain all that here, since they can explain it way better than I can.

Requirements:

You will need to have the following things in order for this setup to work:

- PS3 connected to a network/internet.
- PC connected to the same network or the internet.
- Synergy installer for Windows/OSX/Linux/PS3 YDL 6.

Downloading the installers depends entirely on your selection. I was unable to find a later release for Synergy 1.3.1 for YDL 6. However, I might compile one on my own and upload it here (I am not making any promises :P ).

From here on, you can follow the official Synergy guide:

Step 1 – Choose a server
The first step is to pick which keyboard and mouse you want to share. The computer with that keyboard and mouse is called the “primary screen” and it runs the synergy server. All of the other computers are “secondary screens” and run the synergy client.

Step 2 – Install the software

Second, you install the software. Choose the appropriate package and install it. For example, on Windows you would run SynergyInstaller. You must install the software on all the computers that will share the mouse and keyboard (clients and server). On OS X you’ll just have a folder with some documentation and two programs. You can put this folder anywhere.

Step 3 – Configure and start the server

Next you configure the server. You’ll tell synergy the name of the primary and secondary screens, which screens are next to which, and choose desired options. On Windows there’s a dialog box for setting the configuration. On other systems you’ll create a simple text file.

Note that when you tell synergy that screen A is to the left of screen B this does not imply that B is to the right of A. You must explicitly indicate both relations. If you don’t do both then when you’re running synergy you’ll find you’re unable to leave one of the screens.

Windows
On Windows run synergy by double clicking on the synergy file. This brings up a dialog. Configure the server:

* Click the Share this computer's keyboard and mouse (server) radio button
* Click the Screens & Links Configure... button
* Click the + button to add the server to the Screens list
o Enter the name of server (the computer's name is the recommended name)
o Optionally enter other names the server is known by
o Click OK
* Use the + button to add your other computers
o Using a computer's name as its screen name is recommended
o Choose desired screen options on the Add Screen dialog
* Use the controls under Links to link screens together
o Click (once) on the server's name in the Screens list
o Choose the screen to the left of the server; use --- if there is no screen
to the left of the server
o Choose the screens to the right, above and below the server
o Repeat the above steps for all the other screens
* Click OK to close the Screens & Links dialog
* Use Options... to set desired options
* If the server's screen name is not the server's computer name:
o Click Advanced...
o Enter the server's screen name next to Screen Name
o Click OK

Now click Test. The server will start and you’ll see a console window with log messages telling you about synergy’s progress. If an error occurs you’ll get one or more dialog boxes telling you what the errors are; read the errors to determine the problem then correct them and try Test again. See Step 5 for typical errors.

Unix or Mac OS X
Create a text file named synergy.conf with the following:

section: screens
screen1:
screen2:
end
section: links
screen1:
right = screen2
screen2:
left = screen1
end

Replace each occurrence of screen1 with the host name of the primary screen computer (as reported by the hostname program) and screen2 with the host name of a secondary screen computer. In the above example, screen2 is to the right of screen1 and screen1 is to the left of screen2. If necessary you should replace right and left with left, right, up, or down. If you have more than two computers you can add those too: add each computer’s host name in the screens section and add the appropriate links. See the configuration guide for more configuration possibilities.

Now start the server. Normally synergy wants to run “in the background.” It detaches from the terminal and doesn’t have a visible window, effectively disappearing from view. Until you’re sure your configuration works, you should start synergy “in the foreground” using the -f command line option.

On unix type the command below in a shell. If synergys is not in your PATH then use the full pathname.

synergys -f --config synergy.conf

On OS X open Terminal in the Utilities folder in the Applications folder. Drag the synergys program from the synergy folder onto the Terminal window. The path to the synergys program will appear. Add the following to the same line, type a space at the end of the line but don’t press enter:

-f --config

Now drag the synergy.conf file onto the Terminal window and press enter. Check the reported messages for errors. Use ctrl+c to stop synergy if it didn’t stop automatically, correct any problems, and start it again.

The Client

Ok, I am not going to go over configuring different clients in this post, since we are only concerned with Yellow Dog Linux. However, if you still want to do that, you can read about it on their homepage. This is where the tricky part starts. Configuring the PS3 for Synergy turned out to be way more difficult than I imagined. This was not because of Synergy itself but because the PS3′s network configuration kept breaking all the time. I am going to make a seperate post about that, so let’s move on to configuring it.

First install the Synergy RPM that you downloaded from link in the earlier part of this post. You need to make sure that you are connected to the internet for the RPM to install correctly. Once you install it, you can test if synergy can connect to your server by typing:

synergy -f

For example, I did:

synergy -f 192.168.1.2

AutoStarting Synergy with YellowDog Linux

All of this won’t be of any use until this setup always runs automatically whenever we start YDL on the PS3. So firstly, you need to configure your Server to AutoStart Synergy everytime it boots. To configure that, you can follow their official guide on this page.

Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. It’s best to have the display manager start synergy. You’ll need the necessary (probably root) permission to modify the display manager configuration files. If you don’t have that permission you can start synergy after logging in via the .xsession file.

Typically, you need to edit three script files. The first file will start synergy before a user logs in, the second will kill that copy of synergy, and the third will start it again after the user logs in.

The files we need to edit are:

gdm/Init/Default
gdm/PostLogin/Default
gdm/PreSession/Default
gdm/PostSession/Default

You need to be logged in as root to perform the steps below. Open up a terminal and type:

su -

Enter the root password when it asks you to. Now navigate to the following directory:

cd /etc/gdm

Then Type

gedit Init/Default

you need to write the following lines into the file. You should write them somewhere on the top of this file:

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc

Save it and then open the next file using gedit and enter the following lines into it. Note that this file may be called, Default.sample and you will need to rename it to make it work. It might be empty as well.

gedit /PostLogin/Default

and enter the following lines

/usr/bin/killall synergyc
sleep 1

You need to enter the following lines in the next two files at gdm/PreSession/Default and gdm/PostSession/Default.

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc

Save all the files and verify the changes. Logout and restart the client and once you get past booting screen, you will notice that you can now switch between the server and client screens. The server should also display that the client is connected now. This setup will work for all users but you always need to make sure that your server is running.

So, there you have it.

Regards,
M.H.A.Q.S.

Read full story »

Mame SDL on PS3 YellowDog Linux 5

I just walked myself over to install MAME on the Playstation 3 and I thought, I should post how to get MAME working with Yellow Dog Linux 5. I also got many of the help from pages on internet especially this one and this one. Much part of this post is taken from these links and I thank them and fully credit them for their work.

I agree that SDLMame 0.79 works way better than any later version. So it is a choice for you. Here goes:

- Log in (as a user or root, you should know root’s password). Its generally not a good idea to work as root in Linux, so avoid it as much as possible; Instead use ‘su’.

- You need to have YUM configured correctly in order for this to work right because there are some dependecies that will be resolved automatically if YUM is configured right.

- So first go and follow the YUM & PUP section on this page. If you get YUM &PUP working, you can do a search for MAME SDL and if you can’t then you can download MAME SDL from the following link:

MAME SDL 0.106
http://bordeaux.freshrpms.net/rpm.html?id=1236

MAME SDL 0.79
http://rpmfind.net/linux/RPM/freshrp…-1.fr.ppc.html

If yum is installed correctly you should have no problems installing those two files. Also, YDL has everything installed including zlib, so you will only require to download libSDL version 1.2.x or later. If you have YUM configured correctly, then YDL will automatically download any dependecies and install them or you can downlod libSDL from rpmfind or YDL’s own RPM repository here.

Once you have all of that setup (you have mameSDL installed), you need to create the following folders and then configure mame to use them:

- xmamerc file (mame’s resource configuration file- holds all the values including your joystick and full screen and audio modes)
- roms folder (a folder to place your roms)
- cfg folder (folder to have cfg’s stored, you will have other mame related folders too)

Now we create the following folders. I have created these folders as I saw them on the posts I linked and am OK with them, however, you can change them too if you want.

- /usr/share/mame (for xamemerc)
- /usr/share/mame/roms (for roms :P )
- /root/.xmame/cfg (a folder that contains the actual user defined controls for your ps3 remote. It stores them as default.cfg so if you mess up while you are setting your remote settings. Just delete this file and any other file that is specific to the rom you set your controls for).

OK, now that you are familiar with the folders that we will use go to

/usr/share/xmame

in this folder right click and go to create document and name the new document as
xmamerc

Once you did that. Open your ‘xmamerc’ file and paste the following into it

######################### ######################### ########################
### xmame running parameters ###
 
### Digital sound related ###
# dsp-plugin <null> (not set)
timer 0
 
### Sound mixer related ###
# sound-mixer-plugin <null> (not set)
 
### Video Related ###
bpp 0
arbheight 0
heightscale 1
widthscale 1
effect 2
autodouble 1
scanlines 0
artwork 1
use_backdrops 1
use_overlays 1
use_bezels 1
artwork_crop 0
artwork_resolution 0
frameskipper 0
throttle 1
frames_to_run 0
sleepidle 1
autoframeskip 1
maxautoframeskip 8
frameskip 0
brightness 1.000000
pause_brightness 0.650000
gamma 1.000000
norotate 0
ror 0
rol 0
autoror 0
autorol 0
flipx 0
flipy 0
 
### Vector Games Related ###
# vectorres <null> (not set)
beam 1.000000
flicker 0.000000
antialias 1
translucency 1
 
### SDL Related ###
fullscreen 1
doublebuf 0
vidmode_w -1
vidmode_h -1
modenumber -1
 
### X11-window Related ###
 
### XFree86 DGA Related ###
 
### Video Mode Selection Related ###
keepaspect 1
displayaspectratio 1.3333333333333
 
### Sound Related ###
sound 1
samples 1
samplefreq 44100
bufsize 3.000000
volume -3
# audiodevice SDL
# mixerdevice <null> (not set)
 
### Input Related ###
joytype 7
analogstick 1
joydevname /dev/input/js0
mouse 1
ugcicoin 0
usbpspad 1
rapidfire 0
# ctrlr <null> (not set)
 
### Fileio Related ###
rompath /usr/share/mame/roms
samplepath /usr/share/mame/samples
inipath /usr/share/mame/ini
cfg_directory $HOME/.xmame/cfg
nvram_directory $HOME/.xmame/nvram
memcard_directory $HOME/.xmame/memcard
input_directory $HOME/.xmame/inp
hiscore_directory $HOME/.xmame/hi
state_directory $HOME/.xmame/sta
artwork_directory /usr/share/mame/artwork
snapshot_directory .
diff_directory $HOME/.xmame/diff
ctrlr_directory /usr/share/mame/ctrlr
cheat_file /usr/local/share/mame/cheat.dat
hiscore_file /usr/local/share/mame/hiscore.dat
history_file /usr/share/mame/history.dat
mameinfo_file /usr/share/mame/mameinfo.dat
# record <null> (not set)
# playback <null> (not set)
 
### Mame Related ###
defaultgame robby
language english
fuzzycmp 1
cheat 0
skip_disclaimer 1
skip_gameinfo 0
crconly 0
bios default
# state <null> (not set)
 
### Frontend Related ###
clones 1
 
### Internal verification list commands (only for developers) ###
 
### Rom Identification Related ###
 
### General Options ###
loadconfig 0
 
### SDL keymapping ###
#
# sdlmapkey <sdlcode>,<scancode>
#
# SDLcode means the HEX code of the key as it appears in
# include/SDL/SDL_keysym.h
# Scancode means the hexadecimal code that represents the value used for Xmame
# in keyboard inputs, as defined in src/unix/keyboard.h xmame source file
#
 
# An example: map space as "firebutton" (Mame predefines it as KEY_LCONTROL)
# in symbolic SDL/Mame notation it should be:
#
# sdlmapkey SDLK_SPACE,KEY_LCONTROL
#
# So, looking in X11/keysymdef.h and src/unix/keyboard.h, we'll write
# sdlmapkey 0x0020,0x001d
#
# (Other example). To use the F8 key to insert a coin, you should use
# sdlmapkey 0x0121,0x0006
 
### Suggested French (azerty) SDL keymap mods by Luc Saillard.
#
# SDLK_WORLD_18 ² => KEY_TILDE
#sdlmapkey 0x00b2,0x0029
# SDLK_AMPERSAND => KEY_1
#sdlmapkey 0x0026,0x0002
# SDLK_WORLD_73 é => KEY_2
#sdlmapkey 0x00e9,0x0003
# SDLK_QUOTEDBL => KEY_3
#sdlmapkey 0x0022,0x0004
# SDLK_QUOTE => KEY_4
#sdlmapkey 0x0027,0x0005
# SDLK_LEFTPAREN => KEY_5
#sdlmapkey 0x0028,0x0006
# SDLK_MINUS => KEY_6
#sdlmapkey 0x002d,0x0007
# SDLK_WORLD_73 è => KEY_7
#sdlmapkey 0x00e8,0x0008
# SDLK_UNDERSCORE => KEY_8
#sdlmapkey 0x005f,0x0009
# SDLK_WORLD_71 ç => KEY_9
#sdlmapkey 0x00e7,0x000a
# SDLK_WORLD_64 à => KEY_10
#sdlmapkey 0x00e0,0x000b
# SDLK_RIGHTPAREN => KEY_11
#sdlmapkey 0x0029,0x000c
# SDLK_EQUALS => KEY_12
#sdlmapkey 0x003d,0x000d
 
# SDLK_A => KEY_Q
#sdlmapkey 0x0041,0x0010
# SDLK_Z => KEY_W
#sdlmapkey 0x005a,0x0011
# SDLK_CARET => KEY_OPENBRACE
#sdlmapkey 0x005e,0x001a
# SDLK_DOLLAR => KEY_CLOSEBRACE
#sdlmapkey 0x0024,0x001b
 
# SDLK_Q => KEY_A
#sdlmapkey 0x0051,0x001e
# SDLK_M => KEY_COLON
#sdlmapkey 0x004d,0x0027
# SDLK_WORLD_89 ù => KEY_QUOTE
#sdlmapkey 0x00f9,0x0028
# SDLK_ASTERISK => KEY_TILDE
#sdlmapkey 0x002a,0x0029
 
# SDLK_W => KEY_Z
#sdlmapkey 0x0057,0x002c
# SDLK_COMMA => KEY_M
#sdlmapkey 0x002c,0x0032
# SDLK_SEMICOLON => KEY_COMMA
#sdlmapkey 0x003b,0x0033
# SDLK_COLON => KEY_STOP
#sdlmapkey 0x003a,0x0034
# SDLK_EXCLAIM => KEY_SLASH
#sdlmapkey 0x0021,0x0035
############################################################################

Now hit save and your ‘xmamerc’ file should look like mine. You can use this file to manipulate mame settings for Joypad, screen and sound. I already configured this file to work in full screen and have the best possiible display on the PS3 on YDL 5 and that includes sound.

Once all of this is done; You need to put some working roms in your /usr/share/mame/roms folder. The roms are usualy in zip format. PLEASE DO NOT ASK FOR ROMS, YOU WILL NOT GET ANY HELP! You can search for some legal roms to check your MAME installation though.

All done, lets PLAY!!!

Open up the terminal and type

xmame.SDL <romname>
where <romname> represents the actual rom itself rom.zip for example ‘rygar’, and BAMMM you got yourself a working arcade emulator on the PS3 YDL linux.

To edit your PS3 remote, hit TAB on your keyboard, once the emulator starts, this will open up a menu with the inputs you want with the ‘xmamerc’ file. The emulator will recognize your PS3 controller. If you mess up, remember, all you have to do is delete the ‘default.cfg’ file, I told you about earlier.

A good link to setting up your controls is below:
http://www.mame.net/mamefaq.html#h03

Some FAQs:

Q. I can’t see the .xmame folder?
A. Folders starting with a ‘.’ are hidden in linux, so you will need show them explictly.

Q. My PS3 controller won’t work.
A. Try deleting the default.cfg file and then retry. Oh and one more thing, as far as I know, you need to have the PS3 controller plugged with the USB wire :P .

Q. YUM keeps giving me an error.
A. Yeah, YUM is not correctly configured by default in PS3, follow the guide, I linked above. If YUM GUI keeps giving you errors, you can use the ‘yum’ command in the Command Terminal to perform the search and install operations.

Q. My Screen size in 1080p is soooo small :S. How do I stretch it?
A. Well, Software stretching is something you can’t do with MAME 0.79 but you can switch PS3′s video mode by either booting in 480i/p or using the command ‘ps3videomode -v <number>’. For more information on the ‘ps3videomode’ command, please refer to this page. I have not tried MAME 0.106, but I think there are Software Stretch options in later versions of MAME, so hunt around.

Q. I need more help.
A. Go ahead, ask. But don’t ask anything that’s already mentioned in the above post.

M.H.A.Q.S.

Read full story »