Try New Technology

Archive for April, 2015

Linux: Batch rename to remove # leading characters from files of a certain type

by on Apr.12, 2015, under Techie

If you have a bunch of files like:

$ ls /home/me/Desktop/Music/
0001 – File1.mp3
0002 – File2.mp3
0003 – File3.doc

$

And you want to remove the “0001 – ” from the start of all of them then you can use the following expressing to do this provided they are all in the same folder (if not just run this more than once):

cd /home/me/Desktop/Music/ && for file in *mp3; do mv "$file" "${file:8}"; done

Afterwards:

$ ls /home/me/Desktop/Music/
File1.mp3
File2.mp3
0003 – File3.doc

$

NOTE: For more details see http://community.linuxmint.com/tutorial/view/1162 as I got my example from there.

Comments Off on Linux: Batch rename to remove # leading characters from files of a certain type more...

RetroPie Controller info

by on Apr.12, 2015, under Techie, Video Games

To support Xbox controllers on the RetroPie image for Raspberry Pi 2 units please use the following. This may work for other controllers, but I have no way to test.

NOTE: Use ls /dev/input/ to make sure the “input_player#_joypad_index = ” values are correct. For most they should be js0, js1, etc. You could have something weird like js1, 2, etc at which point you will need to adjust the player1 from 0 to 1 and then so on and so forth.

Edit the /opt/retropie/configs/all/retroarch.cfg file

Add the following to the end of the file

# Start
input_joypad_driver = linuxraw
input_player1_joypad_index = "0"
input_player1_up_axis = "-1"
input_player1_down_axis = "+1"
input_player1_left_axis = "-0"
input_player1_right_axis = "+0"
input_player1_a_btn = "0"
input_player1_b_btn = "1"
input_player1_x_btn = "2"
input_player1_y_btn = "3"
input_player1_select_btn = "6"
input_player1_start_btn = "7"
input_player2_joypad_index = "1"
input_player2_up_axis = "-1"
input_player2_down_axis = "+1"
input_player2_left_axis = "-0"
input_player2_right_axis = "+0"
input_player2_a_btn = "0"
input_player2_b_btn = "1"
input_player2_x_btn = "2"
input_player2_y_btn = "3"
input_player2_select_btn = "6"
input_player2_start_btn = "7"
input_player3_joypad_index = "2"
input_player3_up_axis = "-1"
input_player3_down_axis = "+1"
input_player3_left_axis = "-0"
input_player3_right_axis = "+0"
input_player3_a_btn = "0"
input_player3_b_btn = "1"
input_player3_x_btn = "2"
input_player3_y_btn = "3"
input_player3_select_btn = "6"
input_player3_start_btn = "7"
input_player4_joypad_index = "3"
input_player4_up_axis = "-1"
input_player4_down_axis = "+1"
input_player4_left_axis = "-0"
input_player4_right_axis = "+0"
input_player4_a_btn = "0"
input_player4_b_btn = "1"
input_player4_x_btn = "2"
input_player4_y_btn = "3"
input_player4_select_btn = "6"
input_player4_start_btn = "7"
input_exit_emulator_btn = "4"
input_menu_toggle_btn = "5"
# End

NOTE: I used http://howchoo.com/g/n2qyzdk5zdm/build-your-own-raspberry-pi-retro-gaming-rig to figure out how to build my RetroPie, though N64 isn’t working yet.

Comments Off on RetroPie Controller info more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!