LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2012, 05:41 PM   #1
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Rep: Reputation: 3
I need to change minecraft directory as root


Code:
tyler@tyler-Inspiron-531s:~$ cd \.minecraft
tyler@tyler-Inspiron-531s:~/.minecraft$ ls
bin                    lib                ModLoader.txt  stats
config                 Minecraft.desktop  mods           texturepacks
Craftbukkit            MineCraft.desktop  options.txt    texturepacks-mp-cache
crash-reports          minecraft.jar      resources      TooManyItems.txt
default_reference.xml  Minecraft.sh       saves
Icons                  Minecraft.sh~      screenshots
lastlogin              Minecraftsvg       servers.dat
tyler@tyler-Inspiron-531s:~/.minecraft$
I need to change the .minecraft directory to root but I can't figure out directory structure...Please help! Also need to add this to script to run it every time.
Code:
#!/bin/sh
 BINDIR=$(dirname "$(readlink -fn "$0")")
 cd "$BINDIR"
 chown -R tyler:tyler /home/minecraft
 java -Xmx1024M -Xms512M -jar minecraft.jar
 chmod -R 755 /home/minecraft
 
Old 11-08-2012, 05:51 PM   #2
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
here is a thread I been trying to use...just doesn't work....

Code:
Re: Cannot start minecraft with FML
« Reply #4 on: September 26, 2012, 02:14:32 PM »
had similar problem with my debian dedicated server. FML tries to load some files. 
i managed this by start minecraft this as root. after that u have give rights back to the user...
u know this stuff like:
Code: [Select]

chown -R userxyz:userxyz /home/minecraft
chmod -R 755 /home/minecraft

Last edited by EODSteven; 11-08-2012 at 06:39 PM.
 
Old 11-08-2012, 08:23 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by EODSteven View Post
here is a thread I been trying to use...just doesn't work....
That thread wasn't clear at all plus it mentions copying files as alternative. So before you follow that advice I think you should know if that will solve your problems. What are the actual errors you've been getting?
 
Old 11-08-2012, 08:28 PM   #4
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
So what exactly the problem is? if you want to change owner and group of the dir. to root:root, then you can do it in same way as you did with tylor:tylor, as-
Code:
chown root:root <dir>
Quote:
chown -R tyler:tyler /home/minecraft
Pl make sure is it "minecraft" or ".minecraft"!
Also post output of ls -la, instead of just ls.
Quote:
tyler@tyler-Inspiron-531s:~/.minecraft$
I am not sure, but ain't you asking to change it in your shell prompt (asking just because of my doubt)?
 
Old 11-09-2012, 05:52 AM   #5
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
When I wrote this last night i don't think I knew what I really needed but i've had some time to think about it so I hope i can get a better scenario. I'm not a gamer, My grandson askes me from time to time to help him set up stuff on his Minecraft game...so I'm asking for help!

Apparently for this game to load properly, I'm assuming because it updates everytime it loads, it needs to be run as the root or home...(make sense?...I hope so cause it doesn't to me!) I have a script file that loads the proper java settings and starts his Minecraft game so I just need to add the commands that make the .minecraft folder the root or home folder and that is supposed to solve the loading issue...(the game freezes now when it tries to load a program called FML or Forge Mod Loader, that it needs to update everytime it loads.)

In the threads I've been reading the commands needed to load this game properly ar chown and chmod but I do not know how to comunicate the path I need. I know the Minecraft folder is in tyler-home-.mincraft but there is also all this stuff that makes no sense to me...tyler@tyler-Inspiron-531s:. I don't understand basic directory structure in Linux...I know, you guys are saying how stupid I am, but I'm not..I'm reasonably intelligent. The only drawback I have noticed in Linux is the basic directory structure. It is just plain confusing to me. Other than that, It is wonderful!

Can anyone help please?

Last edited by EODSteven; 11-09-2012 at 05:55 AM.
 
Old 11-09-2012, 06:14 AM   #6
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
Here is the screen shot of ls -la.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2012-11-09 06:16:02.jpg
Views:	135
Size:	209.7 KB
ID:	11188  

Last edited by EODSteven; 11-09-2012 at 06:16 AM.
 
Old 11-09-2012, 06:24 AM   #7
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
Here is where the game is freezing....trying to update FML....
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2012-11-09 06:22:34.png
Views:	34
Size:	24.8 KB
ID:	11189  
 
Old 11-09-2012, 06:32 AM   #8
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by unSpawn View Post
That thread wasn't clear at all plus it mentions copying files as alternative. So before you follow that advice I think you should know if that will solve your problems. What are the actual errors you've been getting?
Yea I tried just the copy files instead of the update...only thing is it tells you to put the files in your lib folder and no such folder exists. I created it in the .minecraft folder and did that..still nothing. Thanks though...
 
Old 11-09-2012, 06:38 AM   #9
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
I tried this in my script file, still not working....

Code:
#!/bin/sh
 BINDIR=$(dirname "$(readlink -fn "$0")")
 cd "$BINDIR"
 chown -R tyler:tyler home/tyler/.minecraft
 chmod -R 755 home/tyler/.minecraft
 java -Xmx1024M -Xms512M -jar minecraft.jar
 
Old 11-09-2012, 06:42 AM   #10
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,279

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
Apparently for this game to load properly, I'm assuming because it updates everytime it loads, it needs to be run as the root or home
What do you mean by "it needs to be run as root or home"? It should be run normally - on user privilages. This game is programmed that way, it needs to be in ".minecraft" in user home directory. And user running this game needs to have write access to this directory. The simplest way is just install it with user account who want to play it.

The some harder (if you as administrator want to block changing executable files of this game and resources) you can use an union mounting. That way basic files to start a game, mods and for example default settings will be maintained by you on read only directory and files changed by game wil be stored somewhere else in user home diectory.

In this script you have written "home/tyler/.minecraft" it should be absolute path "/home/tyler/.minecraft".

Last edited by eSelix; 11-09-2012 at 06:48 AM.
 
Old 11-09-2012, 06:54 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by EODSteven View Post
I'm not a gamer, My grandson askes me from time to time to help him set up stuff on his Minecraft game...
I don't know if he's old (and responsible) enough to be interested in (and capable of) more than point-and-click stuff because it would benefit you (less stress) and him (self-reliance, immersion, understanding) if he got to the point where he can take care of this himself.


Quote:
Originally Posted by EODSteven View Post
In the threads I've been reading the commands needed to load this game properly ar chown and chmod
If that's all you need then look at shivaa's post.


Quote:
Originally Posted by EODSteven View Post
Apparently for this game to load properly, I'm assuming because it updates everytime it loads, it needs to be run as the root or home...(make sense?...I hope so cause it doesn't to me!) I have a script file that loads the proper java settings and starts his Minecraft game so I just need to add the commands that make the .minecraft folder the root or home folder and that is supposed to solve the loading issue...(the game freezes now when it tries to load a program called FML or Forge Mod Loader, that it needs to update everytime it loads.)
Making the ~/.minecraft folder the root or home folder for the process and running Minecraft as root are two completely different things. If it's more than just chmod / chown commands then it would be good to know what actual errors you've been getting and debug screen output, crash information or running the client in debug mode could provide more information.

Alternatively you could (have your grandson) follow the FML installation instructions or the Forge installation instructions and build a new Minecraft installation in another location (say "~/.minecraft_new") and if that doesn't work out you could (have your grandson) ask in the Minecraft forum.


Quote:
Originally Posted by EODSteven View Post
you guys are saying how stupid I am, but I'm not
If you say you're not then who would we be to doubt that?..
 
Old 11-09-2012, 07:00 AM   #12
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by eSelix View Post
What do you mean by "it needs to be run as root or home"? It should be run normally - on user privilages. This game is programmed that way, it needs to be in ".minecraft" in user home directory. And user running this game needs to have write access to this directory. The simplest way is just install it with user account who want to play it.

The some harder (if you as administrator want to block changing executable files of this game and resources) you can use an union mounting. That way basic files to start a game, mods and for example default settings will be maintained by you on read only directory and files changed by game wil be stored somewhere else in user home diectory.

In this script you have written "home/tyler/.minecraft" it should be absolute path "/home/tyler/.minecraft".
It appears your not familiar with Game Modding either....Basically, everytime this game loads it reinstalls itself to run the Mods but in linux in order to install there is some privilage that must be invoked such as home or root. This has to be done every time He starts the game not just once. Thanks anyway....
 
Old 11-09-2012, 07:08 AM   #13
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
There are lots of ways to say it's not gonna work by saying my skills aren't good enough, but I bet someone can figure this out. Obviously the guy who wrote the other thread who can barely speak english was on to something. I don't know how to post a debug screen and I wouldn't think that would be a skill appropriate for a Linux Newbie. Constructive crticism please ...not just bashing.
 
Old 11-09-2012, 07:11 AM   #14
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 196

Original Poster
Rep: Reputation: 3
Can anyone figur out what this guy is saying?

Quote:
Originally Posted by EODSteven View Post
here is a thread I been trying to use...just doesn't work....

Code:
Re: Cannot start minecraft with FML
« Reply #4 on: September 26, 2012, 02:14:32 PM »
had similar problem with my debian dedicated server. FML tries to load some files. 
i managed this by start minecraft this as root. after that u have give rights back to the user...
u know this stuff like:
Code: [Select]

chown -R userxyz:userxyz /home/minecraft
chmod -R 755 /home/minecraft
 
Old 11-09-2012, 07:26 AM   #15
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Well, I am also not familiar with this game, but after reading all the threads above, it sounds some inappropriate permissions/ownership set on the directories, which are causing the pb.
Also you've made some mistakes in your script with paths & directory names. So once invoke following series of cmds:
Code:
cd /home/tyler
chown -R tyler:tyler .
chmod -R 755 .
chmod -R 755 ~/.minecraft
chown -R tyler:tyler ~/.minecraft
java -Xmx1024M -Xms512M -jar minecraft.jar
If it cannot help, then pl share the error message, if any. Be careful about paths, directory names & their spelling, when you're using them. Also take a note, if there're any link files for .minecraft inside /home/tyler or inside /home/tyler/.minecraft directory, because chown & chmod cmds with -R option will not change permissions/ownership of links. For that you'll need to mention "-h" option with -R.

Last edited by shivaa; 11-09-2012 at 07:30 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I change change the home directory to be owned by me and not root? Slackware theif519 Linux - Newbie 4 06-24-2011 12:21 PM
[SOLVED] chroot error "cannot change root directory to /jail: Operation not permitted" Soji Antony Linux - Newbie 8 05-23-2011 08:29 PM
chroot:cannot change root directory to: No such file directory janakiramulu Linux From Scratch 5 04-23-2011 01:00 AM
Change the Root directory almcneill Linux - Software 2 06-29-2009 08:36 PM
chroot cannot change the root directory alkaff Linux From Scratch 3 05-11-2008 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration