Author Topic: inxi root requirement  (Read 22588 times)

jedi

  • DEFCON 1
  • Posts: 1638
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: inxi root requirement
« Reply #45 on: January 18, 2013, 09:50:18 PM »
I'm back in my go to partition now, so I don't know if my info will help or is even relevant.  Logged into OB mine works fine without root same as in Xfce.  Of course I've ran

export PATH="$PATH:/sbin:/bin"

so it works in Xfce and OB and I've also shut down, logged back in and it works with no issues...  (that is on my sda1 which is my go to)

As you can see by my last post in this thread, logged into my /sda7 (test install) which is my Liquorix VSIDO install, even after running the export PATH="$PATH:/sbin:/bin" it still wanted root...  So, I'm confused too.  Works in one install, but not the other?  How weird is that?
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #46 on: January 18, 2013, 10:26:01 PM »
Fresh install of:
Code: [Select]
VSIDO Debian kernel 3.7-1
VSIDO kernel 3.7-1 - Latest Upload 10JAN2013 12:30 CST
ONLY change, I brought ~/.mozilla over to get my bookmarks.

Currently in OpenBox session.
/home/sector11/bin is empty


Code: [Select]
sector11@sda1-2:~$ $PATH
bash: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/home/sector11/bin: No such file or directory
sector11@sda1-2:~$ inxi
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$

Code: [Select]
sector11@sda1-2:~$ export PATH="$PATH:/sbin:/bin"
sector11@sda1-2:~$ re
sector11@sda1-2:~$ inxi -F
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$ /usr/local/bin/inxi -F
bash: /usr/local/bin/inxi: No such file or directory
sector11@sda1-2:~$ /usr/sbin/inxi -F
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$

As you see: sector11@sda1-2 <<--- partition 1&2 - the 100% fresh install.

Could it be that there is something different between the three ISO's ??
OR - as I see from Jed's post above (I got a warning) -- maybe it is a kernel related thing.

grabbing at straws now ... I will stay in this Debian "TRUNK" version for now to TEST ... tell me what else I can to.

Stay Home

VastOne

  •      v-ger
  • Posts: 4196
    • View Profile
    • VSIDO Community
Re: inxi root requirement
« Reply #47 on: January 18, 2013, 10:31:12 PM »
Why is it only 14k? Mine is 303k

Have you ran smxi on this setup yet?

smxi and inxi and all of the smxi scripts are just a placeholder for a setup until you run smxi the first time.  It then goes out and grabs and installs all of the smxi scripts

I wonder if this is the entire issue on newer installs
VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #48 on: January 18, 2013, 10:34:00 PM »
^ No this is a 100% fresh install - no welcome script - no smxi script have been run.
You got inxi via smxi?

If so that might be a part of the problem.

Stay Home

VastOne

  •      v-ger
  • Posts: 4196
    • View Profile
    • VSIDO Community
Re: inxi root requirement
« Reply #49 on: January 18, 2013, 10:40:47 PM »
Yes, inxi is part of the smxi scripts.  That is the only way it is installed in VSIDO
VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #50 on: January 18, 2013, 10:44:32 PM »
Yes, inxi is part of the smxi scripts.  That is the only way it is installed in VSIDO

Well, if you look back a few posts your see that in my default setup, inxi is only 14k there as well, "except" for the version that I brought over from my backup that has the script in ~/bin.

I have never seen the inxi script in smxi, all I have ever done there is get a kernel and nvidia drivers.
Stay Home

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #51 on: January 18, 2013, 10:53:29 PM »
I originally grabbed the deb here:

Code: [Select]
http://code.google.com/p/inxi/wiki/Installation

For debian systems use cathbards repo:

wget ftp://cathbard.com/binary/inxi*.deb

Or if you have cathbards repos ( add cathbard repos ) in your apt sources.list:

apt-get update && apt-get install inxi

Code: [Select]
sector11@sda1-2:~$ wget ftp://cathbard.com/binary/inxi*.deb
--2013-01-18 19:47:42--  ftp://cathbard.com/binary/inxi*.deb
           => ‘.listing’
Resolving cathbard.com (cathbard.com)... 178.77.75.34
Connecting to cathbard.com (cathbard.com)|178.77.75.34|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /binary ... done.
==> PASV ... done.    ==> LIST ... done.

    [    <=>                                ] 19,611      25.4KB/s   in 0.8s   

2013-01-18 19:47:47 (25.4 KB/s) - ‘.listing’ saved [19611]

Removed ‘.listing’.
--2013-01-18 19:47:47--  ftp://cathbard.com/binary/inxi_1.8.4-1_all.deb
           => ‘inxi_1.8.4-1_all.deb’
==> CWD not required.
==> PASV ... done.    ==> RETR inxi_1.8.4-1_all.deb ... done.
Length: 115066 (112K)

100%[======================================>] 115,066     74.8KB/s   in 1.5s   

2013-01-18 19:47:50 (74.8 KB/s) - ‘inxi_1.8.4-1_all.deb’ saved [115066]

sector11@sda1-2:~$

Stay Home

VastOne

  •      v-ger
  • Posts: 4196
    • View Profile
    • VSIDO Community
Re: inxi root requirement
« Reply #52 on: January 18, 2013, 10:55:43 PM »
Again, there is no need to install inxi, it is and has always been part of the smxi scripts
VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #53 on: January 18, 2013, 10:57:16 PM »
I only grabbed it to look at the bash script - it is the same.

I am running "up" now ... then will run smxi to get inxi

Upgrading 71 getting 2 ... this could take a bit.

Where do I find it in smxi?
Stay Home

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #54 on: January 18, 2013, 11:11:57 PM »
OK up is done now ...

Where do I find it in smxi? - as I said I have never seen it there.
Stay Home

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #55 on: January 18, 2013, 11:29:41 PM »
Hello!!!
Stay Home

VastOne

  •      v-ger
  • Posts: 4196
    • View Profile
    • VSIDO Community
Re: inxi root requirement
« Reply #56 on: January 18, 2013, 11:53:49 PM »
It is not 'in' smxi anywhere

smxi is a series of scripts that include the smxi, sgfxi, svmi, rbxi, and inxi scripts.  Each of these are separate scripts all packaged together when you install smxi

The smxi in VSIDO is a stub installer, a script in place to run and install the first time smxi is run on a system  Here is info on the stub installer

I could not run and then package smxi because it would take on my settings for everyone and that is not a good idea.  The stub installer is perfect

I will write that up in the install notes and the Install How To

Sorry I did not get back to you right away, I had to eat.
VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #57 on: January 19, 2013, 12:15:20 AM »
Sorry I did not get back to you right away, I had to eat.

Yea we have to do that on occasion  :D

And your explanation tells me exactly why root is needed.  Root is needed for; smxi, sgfxi, svmi, rbxi so it would stands to reason that it would be required for inxi as well.

I just installed the Nvidia driver via smxi (twice to get rid of nouveau) - it did NOT install inxi!

Code: [Select]
sector11@sda1-2:~$ inxi
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$

Looks like smxi did not install it search after running smxi:


Code: [Select]
sector11@sda1-2:~$ inxi
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/home/sector11/bin
sector11@sda1-2:~$ export PATH="$PATH:/sbin:/bin"
sector11@sda1-2:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/home/sector11/bin:/sbin:/bin
sector11@sda1-2:~$ inxi
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$ re
sector11@sda1-2:~$ inxi
Error No: 1 - You must be root to run this script!
sector11@sda1-2:~$

/lib/live/mount/rootfs/filesystem.squashfs/usr/sbin/inxi
Code: [Select]
#!/bin/bash
########################################################################
####  Script Name: smxi-stub
####  stub installer for smxi scripts
####  Only supports true Debian based distros.
####  version: 3.0
####  Date: 24 February 2010
########################################################################
####  Copyright (C) Harald Hope, sidux team members 2007-2010
####
####  This program is free software; you can redistribute it and/or modify it under
####  the terms of the GNU General Public License as published by the Free Software
####  Foundation; either version 2 of the License, or (at your option) any later version.
####
####  This program is distributed in the hope that it will be useful, but WITHOUT
####  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
####  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
####
####  Get the full text of the GPL here: http://www.gnu.org/licenses/gpl.txt
########################################################################

# Please do not change the logic here, it makes it too hard to read linearly:
# [ ! -f somefile ] && do something is far easier to read than [ -f somefile ] || do something
# tempfile primary cleanup is now handled by called scripts, so no need to complicate this
# simple stub with the cleanup stuff. Now it just cleans up after itself each time.

# To get the full power and user friendliness for this stub installer
# rename it to: smxi
# place it in /usr/sbin, that is, as /usr/sbin/smxi, make it executable: chmod +x /usr/sbin/smxi
# add the following symbolic links in /usr/sbin pointing to /usr/sbin/smxi:
# ln -s /usr/sbin/smxi /usr/sbin/inxi
# ln -s /usr/sbin/smxi /usr/sbin/sgfxi
# ln -s /usr/sbin/smxi /usr/sbin/svmi
# because of how default $PATH works, /usr/sbin will always be checked first for the
# scripts, and if they are missing, this stub will download and execute them, otherwise
# the request will simply be passed along to /usr/local/bin location of actual scripts

# this will handle stub for any other script also
CALLER="$( basename $0 )"
PREFIX='/usr/local/bin/'
DOWNLOAD_URL=''
DOWNLOAD_URL_INXI='http://inxi.googlecode.com/svn/trunk/'
DOWNLOAD_URL_SGFXI='http://smxi.org/sg/'
DOWNLOAD_URL_SMXI='http://smxi.org/sm/'
DOWNLOAD_URL_SVMI='http://smxi.org/sv/'
FILE_DATA_TEMP='' # will handle failed downloads
IS_GOOD=''
# this is the tester for ##**EOF**## endings present in scripts, change this
# if you want to extend this stub to other scripts, smxi/svmi/inxi/sgfxi all use this
SCRIPT_EOF='##\*\*EOF\*\*##'

# args: $1 - error number; $2 - extra data
error_handler()
{
local message=''
case $1 in
1) message='You must be root to run this script!'
;;
2) message="Script download exited with errors.\nThe following download url failed with wget error: $2/n$DOWNLOAD_URL$SCRIPT"
;;
3) message='Failed to download script properly. The file data is corrupted or incomplete!'
;;
4) message="$PREFIX$SCRIPT exec command failed with error number: $2\nPlease try again."
;;
5) message="$PREFIX$SCRIPT not executable!"
;;
6) message="Unknown script requested: $CALLER"
;;
*) message='Unknown error, exiting now.'
;;
esac
echo -e "Error No: $1 - $message"
exit $1
}

# set the SCRIPT/DOWNLOAD_URL/SCRIPT_EOFvalues
case $CALLER in
sgfxi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_SGFXI
;;
smxi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_SMXI
;;
svmi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_SVMI
;;
inxi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_INXI
;;
*)
error_handler 6
;;
esac

# if $SCRIPT exists, it will handle the root tests. Root tests cannot
# be run first because they kill the -h help function
if [ -x "$PREFIX$SCRIPT" ];then
# I'm just going to put a test for basically everything that can go wrong
exec "$PREFIX$SCRIPT" "$@" || error_handler 4 "$?"
else
# only in case of requirement to download script do root test, and just exit
# if not root, anything else is counterintuitive I think for users.
if [ "$( id -u )" -ne 0 ];then
error_handler 1
fi
# downloading to overwrite existing file, but to temp variable, which we then test
FILE_DATA_TEMP="$( wget -q -O - $DOWNLOAD_URL$SCRIPT )" || error_handler 2 "$?"
IS_GOOD=$( grep -si "$SCRIPT_EOF" <<< "$FILE_DATA_TEMP" )
# test to make sure downloaded data has EOF marker, if yes, it's complete
if [ -z "$IS_GOOD" ];then
error_handler 3
else
# now that the data is tested and not corrupted move to real file
echo "$FILE_DATA_TEMP" > $PREFIX$SCRIPT
# make new file executable
chmod 705 "$PREFIX$SCRIPT"
# then run it with an error handler for unknown weirdness which I'm sure will appear.
if [ -x "$PREFIX$SCRIPT" ];then
# If for some reason it errors on script execution, exit here, but that could be
# something as simple as bad options used
exec "$PREFIX$SCRIPT" "$@" || error_handler 4 "$?"
else
error_handler 5
fi
fi
fi

/usr/sbin/inxi
Code: [Select]
#!/bin/bash
########################################################################
####  Script Name: smxi-stub
####  stub installer for smxi scripts
####  Only supports true Debian based distros.
####  version: 3.0
####  Date: 24 February 2010
########################################################################
####  Copyright (C) Harald Hope, sidux team members 2007-2010
####
####  This program is free software; you can redistribute it and/or modify it under
####  the terms of the GNU General Public License as published by the Free Software
####  Foundation; either version 2 of the License, or (at your option) any later version.
####
####  This program is distributed in the hope that it will be useful, but WITHOUT
####  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
####  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
####
####  Get the full text of the GPL here: http://www.gnu.org/licenses/gpl.txt
########################################################################

# Please do not change the logic here, it makes it too hard to read linearly:
# [ ! -f somefile ] && do something is far easier to read than [ -f somefile ] || do something
# tempfile primary cleanup is now handled by called scripts, so no need to complicate this
# simple stub with the cleanup stuff. Now it just cleans up after itself each time.

# To get the full power and user friendliness for this stub installer
# rename it to: smxi
# place it in /usr/sbin, that is, as /usr/sbin/smxi, make it executable: chmod +x /usr/sbin/smxi
# add the following symbolic links in /usr/sbin pointing to /usr/sbin/smxi:
# ln -s /usr/sbin/smxi /usr/sbin/inxi
# ln -s /usr/sbin/smxi /usr/sbin/sgfxi
# ln -s /usr/sbin/smxi /usr/sbin/svmi
# because of how default $PATH works, /usr/sbin will always be checked first for the
# scripts, and if they are missing, this stub will download and execute them, otherwise
# the request will simply be passed along to /usr/local/bin location of actual scripts

# this will handle stub for any other script also
CALLER="$( basename $0 )"
PREFIX='/usr/local/bin/'
DOWNLOAD_URL=''
DOWNLOAD_URL_INXI='http://inxi.googlecode.com/svn/trunk/'
DOWNLOAD_URL_SGFXI='http://smxi.org/sg/'
DOWNLOAD_URL_SMXI='http://smxi.org/sm/'
DOWNLOAD_URL_SVMI='http://smxi.org/sv/'
FILE_DATA_TEMP='' # will handle failed downloads
IS_GOOD=''
# this is the tester for ##**EOF**## endings present in scripts, change this
# if you want to extend this stub to other scripts, smxi/svmi/inxi/sgfxi all use this
SCRIPT_EOF='##\*\*EOF\*\*##'

# args: $1 - error number; $2 - extra data
error_handler()
{
local message=''
case $1 in
1) message='You must be root to run this script!'
;;
2) message="Script download exited with errors.\nThe following download url failed with wget error: $2/n$DOWNLOAD_URL$SCRIPT"
;;
3) message='Failed to download script properly. The file data is corrupted or incomplete!'
;;
4) message="$PREFIX$SCRIPT exec command failed with error number: $2\nPlease try again."
;;
5) message="$PREFIX$SCRIPT not executable!"
;;
6) message="Unknown script requested: $CALLER"
;;
*) message='Unknown error, exiting now.'
;;
esac
echo -e "Error No: $1 - $message"
exit $1
}

# set the SCRIPT/DOWNLOAD_URL/SCRIPT_EOFvalues
case $CALLER in
sgfxi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_SGFXI
;;
smxi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_SMXI
;;
svmi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_SVMI
;;
inxi)
SCRIPT="$CALLER"
DOWNLOAD_URL=$DOWNLOAD_URL_INXI
;;
*)
error_handler 6
;;
esac

# if $SCRIPT exists, it will handle the root tests. Root tests cannot
# be run first because they kill the -h help function
if [ -x "$PREFIX$SCRIPT" ];then
# I'm just going to put a test for basically everything that can go wrong
exec "$PREFIX$SCRIPT" "$@" || error_handler 4 "$?"
else
# only in case of requirement to download script do root test, and just exit
# if not root, anything else is counterintuitive I think for users.
if [ "$( id -u )" -ne 0 ];then
error_handler 1
fi
# downloading to overwrite existing file, but to temp variable, which we then test
FILE_DATA_TEMP="$( wget -q -O - $DOWNLOAD_URL$SCRIPT )" || error_handler 2 "$?"
IS_GOOD=$( grep -si "$SCRIPT_EOF" <<< "$FILE_DATA_TEMP" )
# test to make sure downloaded data has EOF marker, if yes, it's complete
if [ -z "$IS_GOOD" ];then
error_handler 3
else
# now that the data is tested and not corrupted move to real file
echo "$FILE_DATA_TEMP" > $PREFIX$SCRIPT
# make new file executable
chmod 705 "$PREFIX$SCRIPT"
# then run it with an error handler for unknown weirdness which I'm sure will appear.
if [ -x "$PREFIX$SCRIPT" ];then
# If for some reason it errors on script execution, exit here, but that could be
# something as simple as bad options used
exec "$PREFIX$SCRIPT" "$@" || error_handler 4 "$?"
else
error_handler 5
fi
fi
fi

OK what do you want me to do now?
Stay Home

VastOne

  •      v-ger
  • Posts: 4196
    • View Profile
    • VSIDO Community
Re: inxi root requirement
« Reply #58 on: January 19, 2013, 12:23:44 AM »
As several people have shown today inxi does not need root to run.  This is a path/environment issue

We have a temp solution now that a person can run

Code: [Select]
export PATH="$PATH:/sbin:/bin"
or you can run

Code: [Select]
inxi: /usr/sbin/inxi

/usr/local/bin/inxi

and that will run it... a person could even create a alias if they wanted to

I am on a system that I used to the latest VSIDO installer with and I have never installed inxi, it comes with the smxi installation that is part of VSIDO

All those packages you are finding verify that.

This is not a pressing issue right now, I just need some time to focus on it.. of which right now I do not have.
VSIDO      VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: inxi root requirement
« Reply #59 on: January 19, 2013, 12:29:55 AM »
Code: [Select]
sector11@sda1-2:~$ export PATH="$PATH:/sbin:/bin"
sector11@sda1-2:~$ re
sector11@sda1-2:~$ inxi: /usr/sbin/inxi
bash: inxi:: command not found
sector11@sda1-2:~$ /usr/local/bin/inxi
bash: /usr/local/bin/inxi: No such file or directory
sector11@sda1-2:~$

OK I stop as well.
It is not here, smxi did not get it.  I wonder if it because I didn't allow smxi to "downgrade" the kernel.

I'll try installing the liquorix version. On sda10 & 11

No panic.
Stay Home