Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dumb root install question

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Sun May 26, 2013 2:01 pm    Post subject: dumb root install question Reply with quote

My regular user account is "not in the sudoers file" so on the rare occasions I need a command shell with root privilege I am accustomed to opening a root terminal.

An app (Calibre) website says it needs installing from the command line and gives me a script beginning "sudo".

If I omit the sudo and run in a root terminal, will my ordinary user account be able to use Calibre, or would some chmod or similar permissions magic be needed to set that up?

I should add, using debian.
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
roseway
LXF regular


Joined: Thu Jan 18, 2007 2:27 pm
Posts: 446

PostPosted: Sun May 26, 2013 7:08 pm    Post subject: Reply with quote

Why don't you just install it from the Debian repos?

Code:
aptitude (or apt-get) install calibre


But the answer to your actual question is that Debian doesn't use sudo in the Ubuntu way by default, and any administrative task can be accomplished just as well (better I would say) without the use of sudo. Running an installation script as root is no different from running it with sudo.
_________________
Eric
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Sun May 26, 2013 10:36 pm    Post subject: Reply with quote

Cheers, I'll use my root shell - have to be tomorrow, now.

The version in the Debian repo is an old one and the Calibre web site advises using the current one.
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Mon May 27, 2013 9:58 pm    Post subject: Reply with quote

Root shell worked great. Happy ePUB creator now at play. Smile
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
roseway
LXF regular


Joined: Thu Jan 18, 2007 2:27 pm
Posts: 446

PostPosted: Tue May 28, 2013 7:41 am    Post subject: Reply with quote

I should have said this before, but I'll say it now anyway: installing programs this way poses a bit of a risk of some conflict occurring in the future, because the package management system doesn't know anything about the installed software.

The proper (and safe) way to do this would be to wrap the install script up in a Debian package so that the package management system does know about it. The easy way to do this is to use checkinstall:

Code:
# checkinstall install.sh


It asks you a couple of simple questions and then makes a .deb package and installs it. All you need to do is make sure that the version number is correctly noted (that's one of the questions you get asked).
_________________
Eric
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Tue May 28, 2013 11:00 am    Post subject: Reply with quote

That would have been a good idea, yes. I don't suppose any of the GUI tools can to that?
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
roseway
LXF regular


Joined: Thu Jan 18, 2007 2:27 pm
Posts: 446

PostPosted: Tue May 28, 2013 12:34 pm    Post subject: Reply with quote

No, I don't think that there's a GUI front end for checkinstall, but it's really very easy to use from the command line.
_________________
Eric
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Tue May 28, 2013 6:39 pm    Post subject: Reply with quote

Um, so, I'd create an install script file called say calibreinstall.sh and containing say:

python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')"

Then I'd open a root shell and do:

# checkinstall calibreinstall.sh

Right?

Could I even just run it all together, as in:

# checkinstall python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')"

or would that do horrible things?
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
roseway
LXF regular


Joined: Thu Jan 18, 2007 2:27 pm
Posts: 446

PostPosted: Tue May 28, 2013 6:57 pm    Post subject: Reply with quote

I've had a look at the Calibre website, and I see what you mean. There isn't an install script as such, but just a command to run. I've tried running it with checkinstall but it failed with several errors. I have no doubt it can be solved, but for the moment I don't have a solution.
_________________
Eric
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Tue May 28, 2013 7:52 pm    Post subject: Reply with quote

Hey, you mean I did the right thing? That doesn't happen very often, grin. Many thanks for your help.
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
roseway
LXF regular


Joined: Thu Jan 18, 2007 2:27 pm
Posts: 446

PostPosted: Tue May 28, 2013 10:44 pm    Post subject: Reply with quote

I'm not sure that I did much, but you're welcome anyway. Smile
_________________
Eric
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast