How do I change player name in minecraft multiplayer in offline mode in Linux?

I have a small Minecraft server (beta 1.5), and every time I log in via offline mode from a client, my name is “Player”. How can I change that?

I know of a way to do it in Windows but it doesn’t help.

  • Why can't I connect to my minecraft server?
  • I am glitching in a bed in Minecraft multiplayer 1.7.2
  • How can I create a farm in the Nether?
  • Why can't I tame my ocelot?
  • Is there any way to avoid this seed planting bug?
  • What is the difference between Technic and Tekkit?
  • The major problem is when others connect to my server they take “Player” as a name and it kicks me off.

    The server’s property is set to:


    I can’t change this to true.

    I’m running the latest version of Ubuntu, and running the client from the terminal using the following command (EDIT: running with sudo, not a good idea, i know…need to get that fixed):

    sudo ./minecraft-1.5.jar

    EDIT:I found the code that I was talking about but it never worked for me:

    java -cp ~/.minecraft/bin/minecraft.jar:~/.minecraft/bin/lwjgl.jar:~/.minecraft/bin/lwjgl_util.jar:~/.minecraft/bin/jinput.jar: -Djava.library.path=~/.minecraft/bin/natives -Xmx1024M -Xms512M net.minecraft.client.Minecraft '"'$USER'"'


    java -Xms512m -Xmx1024m -cp "%APPDATA%\.minecraft\bin\*" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft '"'%1'"'

    Latest Update: IT WORKS!
    I didnt realize that the first part (starting with -cp), was the folder that I ran my game from was the wrong directory, remember that I start the game with sudo, that was the reason I failed, is hould have been:


    Also I have to run this with ‘sudo’ or it wont work…the errors pile up, which as it turns out, and I didnt realize, is bacause it couldnt find any main class files, which I figured out rereading the man for ‘java’

    As a side win, this code now allows me to press: “Quit” button which was missing because of the way I started the game in terminal.

  • Redstone repeater delay if activated
  • Having a problem with lighting a large area
  • Why doesn't the music in Minecraft play all the time?
  • How do I downgrade Minecraft to play on a server running an older version?
  • Minecraft Inventory Saving
  • Can I get struck by lightning in Minecraft?
  • 5 Solutions collect form web for “How do I change player name in minecraft multiplayer in offline mode in Linux?”

    I don’t have access to Minecraft on Linux at the moment, but that command line looks suspicious. Give this a try:

    java -Xms512m -Xmx1024m -cp "$HOME/.minecraft/bin/*" -Djava.library.path="$HOME/.minecraft/bin/natives" net.minecraft.client.Minecraft "$USER"

    If it still isn’t working for you, knowing what does happen (error messages, lets you in but has wrong name, …) would be helpful for further troubleshooting. 🙂

    Edited: Work on Ubuntu 12.04 x32

    *P.S.: after “$USER” you can also add "$PASSWORD" "$SERVER" *

    TL;DR: Use a launcher which can modify the name. Or use some long-winded terminal command to manipulate it.

    Long answer:

    The offline mode in the Minecraft server does not require players to authenticate with the Minecraft account database. However, when you:

    • Directly run the minecraft.jar file
    • Use the “Play Offline” function of the original Minecraft launcher.

    Your in-game name would be “Player”.

    The only way to change this is to:

    • Use an un-offical launcher which can change the name (eg. MinecraftSP)
    • The command line
    • Editing the source code and recompiling it

    When you do any of these methods successfully, your in-game name will then be different, without requiring to authenticate with the Minecraft account database for verification. This verification is done with servers with online-mode=true, thus people who use these methods are unable to join those servers.

    Please note that when you use any of these methods in conjunction with the Minecraft files (minecraft.jar and others), it is illegal if you did not buy the game.

    Although the title only mentions linux, the OP mentions Windows, and searching brought me here.

    I thought I might share my Windows offline name changing solution which I use for testing my plugins when I need multiple clients connected all under different names, naturally.

    @SET /P IGN=IGN=
    @java -Xms512m -Xmx512m -cp "%APPDATA%/.minecraft/bin/*" -Djava.library.path="%APPDATA%/.minecraft/bin/natives" net.minecraft.client.Minecraft %IGN%

    I put the above into a file named Offline.bat When I double click that file, it will open a command window and prompt you to enter the In-Game Name (IGN) you wish to use. Simply enter the name you want to use in and press enter to launch Minecraft in offline mode with that name.

    I was googling offline mode minecraft mac, this was the first site on the list. Thanks to the Unix code I was able make an easy workaround the the info here. I wrote a simple and ugly AppleScript for mac/osx to accomplish the same if you have it installed in the default path. I’m working off of OS X 10.6.8, so I’m unsure if it will work with other versions.

    Copy + Paste to new applescript, compile, save as application, launch.

    property user_name : "Player"
    display dialog "Enter A User Name" default answer "" buttons {"Cancel", "Continue"} default button 2
    set the user_name to text returned of the result
    set UsrApp to (path to current user folder)
    set UsrApp_unx to POSIX path of UsrApp
    set MineScript to "java -cp " & UsrApp_unx & "Library/Application\\ Support/minecraft/bin/minecraft.jar:" & UsrApp_unx & "Library/Application\\ Support/minecraft/bin/lwjgl.jar:" & UsrApp_unx & "Library/Application\\ Support/minecraft/bin/lwjgl_util.jar:" & UsrApp_unx & "Library/Application\\ Support/minecraft/bin/jinput.jar: -Djava.library.path=" & UsrApp_unx & "Library/Application\\ Support/minecraft/bin/natives -Xmx1024M -Xms512M net.minecraft.client.Minecraft '" & user_name & "'"
    do shell script MineScript

    Edit: Also works in Lion

    For Linux, if you use sudo, the ~ will be the root home folder, so it needs to be:

    sudo java -cp /home/"username"/.minecraft/bin/minecraft.jar:/home/"username"/.minecraft/bin/lwjgl.jar:/home/"username"/.minecraft/bin/lwjgl_util.jar:~/.minecraft/bin/jinput.jar: -Djava.library.path=/home/"username"/.minecraft/bin/natives -Xmx1024M -Xms512M net.minecraft.client.Minecraft '"'$USER'"'

    Where it says “username”, substitute your user name without the quotes.

    It worked for me on Ubuntu 11.04.

    We love Playing Games, especially Video Games.