LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-14-2018, 06:45 PM   #1
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 297

Rep: Reputation: 16
Script built Vivaldi installed unintentionally as root with installpkg.


I have very little practical experience with Slackware... I have a new 14.2 install on a laptop. I used a script to build Vivaldi browser and installed it with installpkg:
https://gist.github.com/ruario/dcbba...cc883542ff7ace
As I haven't been able to get it to run, I ran an
Code:
$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?

Last edited by globetrotterdk; 03-14-2018 at 06:49 PM.
 
Old 03-14-2018, 06:55 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by globetrotterdk View Post
I have very little practical experience with Slackware... I have a new 14.2 install on a laptop. I used a script to build Vivaldi browser and installed it with installpkg:
https://gist.github.com/ruario/dcbba...cc883542ff7ace
As I haven't been able to get it to run, I ran an
Code:
$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?
what is the execuable name?
Code:
/opt/Vivaldi/vivaldi(executable)
on your command line if it starts. then look for the desktop file and copy it into
Code:
/usr/share/applications
though it would be wise to open it under root.
Code:
sudo nano Vivaldi.desktop
then find the line in the file
Code:
// here goes the absolute path and executable name
// in Exec 

Exec=/opt/Vivaldi/vivaldi
keeping in mind what I wrote is only an example of what it needs to be.

Code:
-rwxr-xr-x 1 root root 140748848 Feb 26  2017 /opt/blender/blender
permissions on /opt
everyone can execute a app from /opt/ the x tells you that.
owner, group, other are all getting the x

Last edited by BW-userx; 03-14-2018 at 07:04 PM.
 
Old 03-15-2018, 03:18 AM   #3
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 297

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by BW-userx View Post
what is the execuable name?
Code:
/opt/Vivaldi/vivaldi(executable)
Thanks for the reply BW-userx. Here is what things look like in /opt and /vivaldi:
Code:
$ cd /opt
bash-4.3$ ls -l
total 4
drwxr-xr-x 7 root root 4096 Mar 14 23:12 vivaldi
bash-4.3$ cd vivaldi
bash-4.3$ ls -l
total 151192
drwxr-xr-x 2 root root      4096 Feb 27 03:17 cron
-rw-r--r-- 1 root root       812 Feb 27 03:17 features.json
-rw-r--r-- 1 root root  10170896 Feb 27 03:17 icudtl.dat
drwxr-xr-x 2 root root      4096 Feb 27 03:17 lib
-rw-r--r-- 1 root root   2878720 Mar 14 23:12 libffmpeg.so
lrwxrwxrwx 1 root root        36 Mar 14 22:28 libwidevinecdm.so -> /opt/google/chrome/libwidevinecdm.so
-rw-r--r-- 1 root root    432312 Feb 27 03:17 libwidevinecdmadapter.so
drwxr-xr-x 2 root root      4096 Feb 27 03:17 locales
-rw-r--r-- 1 root root    218121 Feb 27 03:17 natives_blob.bin
-rw-r--r-- 1 root root      4672 Feb 27 03:17 product_logo_128.png
-rw-r--r-- 1 root root       520 Feb 27 03:17 product_logo_16.png
-rw-r--r-- 1 root root       527 Feb 27 03:17 product_logo_22.png
-rw-r--r-- 1 root root       573 Feb 27 03:17 product_logo_24.png
-rw-r--r-- 1 root root      9421 Feb 27 03:17 product_logo_256.png
-rw-r--r-- 1 root root      1165 Feb 27 03:17 product_logo_32.png
-rw-r--r-- 1 root root      1602 Feb 27 03:17 product_logo_32.xpm
-rw-r--r-- 1 root root      1690 Feb 27 03:17 product_logo_48.png
-rw-r--r-- 1 root root      2274 Feb 27 03:17 product_logo_64.png
drwxr-xr-x 3 root root      4096 Feb 27 03:17 resources
-rw-r--r-- 1 root root  12511893 Feb 27 03:17 resources.pak
-rw-r--r-- 1 root root   1358436 Feb 27 03:17 snapshot_blob.bin
drwxr-xr-x 2 root root      4096 Feb 27 03:17 swiftshader
-rwxr-xr-x 1 root root      3426 Feb 27 03:17 vivaldi
-rwxr-xr-x 1 root root 125209048 Feb 27 03:17 vivaldi-bin
-rwxr-xr-x 1 root root     19504 Feb 27 03:17 vivaldi-sandbox
-rw-r--r-- 1 root root    824509 Feb 27 03:17 vivaldi_100_percent.pak
-rw-r--r-- 1 root root   1101306 Feb 27 03:17 vivaldi_200_percent.pak
The Vivaldi browser will not execute and there is no feedback of any kind. I know that this build works on a Salix OS system, so if it isn't a permission issue, that would suggest that I am missing something on my system. My Slackware system was installed excluding KDE, but I went through the install in "expert" mode to try to make sure that I included everything that would be normal "gotchas", such as PyQT.
----
Code:
$ vivaldi
bash: vivaldi: command not found

Last edited by globetrotterdk; 03-15-2018 at 03:21 AM.
 
Old 03-15-2018, 05:18 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Try
Code:
# ./vivaldi-bin
 
Old 03-15-2018, 08:16 AM   #5
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 297

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by AwesomeMachine View Post
Try
Code:
# ./vivaldi-bin
Code:
# ./vivaldi-bin
bash: ./vivaldi-bin: No such file or directory
 
Old 03-15-2018, 08:31 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
How did you run your script?
Code:
//Step 1 copy script into another file then make it executable
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ chmod +x latest-Vivaldi

//step 2 run same script
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ ./latest-Vivaldi
Downloading Vivaldi 1.14.1077.55 for x86_64
ca chunk Ka Chunk compiling
....

//step 3 install results

Slackware package "/tmp/vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz" created.

userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ sudo installpkg /tmp/vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz
Verifying package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz.
Installing package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz:
PACKAGE DESCRIPTION:
# vivaldi-stable (Vivaldi web browser)
#
# Vivaldi browser is made with power users in mind by people who love
# the Web.
#
# Homepage:  https://vivaldi.com
#
Executing install script for vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz.
Package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz installed.

//step 4 find where it went.
$ ls /opt
blender  dropbox  share  vivaldi

//step 5 go there

 cd /opt/vivaldi


//step 6 find the executable 
userx@slackwhere101:/opt/vivaldi
$ ls
cron                      product_logo_16.png   resources.pak
features.json             product_logo_22.png   snapshot_blob.bin
icudtl.dat                product_logo_24.png   swiftshader
lib                       product_logo_256.png  vivaldi
libwidevinecdm.so         product_logo_32.png   vivaldi-bin
libwidevinecdmadapter.so  product_logo_32.xpm   vivaldi-sandbox
locales                   product_logo_48.png   vivaldi_100_percent.pak
natives_blob.bin          product_logo_64.png   vivaldi_200_percent.pak
product_logo_128.png      resources


//step 7 run the executable
userx@slackwhere101:/opt/vivaldi
$ ./vivaldi

No suitable library for HTML5 MP4 (H.264/AAC) video and MP3 audio was
found, therefore only open codecs will play.

For assistance on how to enable proprietary media, visit:

https://help.vivaldi.com/article/html5-mp4-h-264aac-video-and-mp3-audio-support-under-linux/
Works for me.

you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications

Last edited by BW-userx; 03-15-2018 at 08:45 AM.
 
Old 03-15-2018, 09:01 AM   #7
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 297

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by BW-userx View Post
Works for me.

you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop. I tried running:
Code:
# removepkg vivaldi

No such package: /var/log/packages/vivaldi. Can't remove.
so that I could try building and install it on Slackware. How do I remove the package?
----
Got it: "vivaldi-stable".

Last edited by globetrotterdk; 03-15-2018 at 09:06 AM.
 
Old 03-15-2018, 09:05 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by globetrotterdk View Post
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop. I tried running:
Code:
# removepkg vivaldi

No such package: /var/log/packages/vivaldi. Can't remove.
so that I could try building and install it on Slackware. How do I remove the package?
Code:
ls /var/log/packages | grep vivaldi
then if you get a return on that.
Code:
sudo removepkg the entire file name off of your return
can you mix salix with slack? I know salix can use slack but is it ambidextrous between the two?
anyways .. it wouldn't hurt to remove it then installed right off of slack. It does not take that much time to do.
 
Old 03-15-2018, 09:17 AM   #9
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 297

Original Poster
Rep: Reputation: 16
New Vivaldi install completed without problems. However:
Code:
$ vivaldi-stable
[3201:3239:0315/151338.399968:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted
Code:
# slackpkg search NSS

Looking for NSS in package list. Please wait... DONE

No package name matches the pattern.
Code:
# sbopkg -s NSS
Searching for NSS
sbopkg: package "NSS" not found.
----
I found the answer. I needed to run:

Code:
# slackpkg upgrade mozilla-nss-3.31.1
Vivaldi is now running Thanks for all the help.

Last edited by globetrotterdk; 03-15-2018 at 09:30 AM.
 
Old 03-15-2018, 09:34 AM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by globetrotterdk View Post
New Vivaldi install completed without problems. However:
Code:
$ vivaldi-stable
[3201:3239:0315/151338.399968:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted
Code:
# slackpkg search NSS

Looking for NSS in package list. Please wait... DONE

No package name matches the pattern.
Code:
# sbopkg -s NSS
Searching for NSS
sbopkg: package "NSS" not found.
----
I found the answer. I needed to run:

Code:
# slackpkg upgrade mozilla-nss-3.31.1
I'm finding all kinds of things for nss using sbofind nss -r
use lower case in your search. it's probably a lib files there is too many here for me to get a definite idea which to use though. I have to have whatever it needs in nss already installed from something else I have installed on my system. Then again I never looked at my messages after it was done.

though I am actually using it right now posting this to you.

edit I just seen your fix... mozilla

Last edited by BW-userx; 03-15-2018 at 09:36 AM.
 
Old 03-15-2018, 09:41 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I just redid it, and did not get any kind of nss errors did see this though,
Code:
  8375 2018-02-26 20:17 usr/share/applications/vivaldi-stable.desktop
so you should have a desktop already. what WindowManager you running? XFCE4 and such should pick it up and put it in their menu. whereas fluxbox, WMaker will not.


EDIT:
I lied due to misinformation. It is not there. It is located here
Code:
$ sudo find / -name vivaldi-stable.desktop
/tmp/repackage-vivaldi-stable/pkg/usr/share/applications/vivaldi-stable.desktop
find: `/home/userx/.gvfs': Permission denied

Last edited by BW-userx; 03-15-2018 at 09:45 AM.
 
Old 04-18-2018, 05:52 AM   #12
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
Quote:
Originally Posted by globetrotterdk View Post
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop
This is your primary problem. You cannot run 64bit binaries on 32bit.
The second issue seems to be that you are not keeping your distro up to date and hence had old NSS libs. This is a security issue as well, so you want to keep an eye on that.

Perhaps you want to update your first post explaining it was simply a case of installing the wrong architecture and having an outdated system. I suggest this because this thread a very confusing read and generally gives the impression there is something very wrong with my packaging script, when there isn't.

While I am here I also want to address some other things. Many of them seem to have been worked out by BW-userx (or you) along the way but just to summerise again to be 100% clear.

Quote:
Originally Posted by globetrotterdk View Post
I ran an
Code:
$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?
Nothing, it should be root owned

Quote:
Originally Posted by BW-userx View Post
what is the execuable name?
Code:
/opt/Vivaldi/vivaldi(executable)
It is “/opt/vivaldi/vivaldi” (note the lower case). There is also a symlink in /usr/bin and that is what the .desktop file points to.

Quote:
Originally Posted by BW-userx View Post
then look for the desktop file and copy it into
Code:
/usr/share/applications
It is already there as “/usr/share/applications/vivaldi-stable.desktop” and contains “Exec=/usr/bin/vivaldi-stable %U”

Quote:
Originally Posted by globetrotterdk View Post
Code:
$ vivaldi
bash: vivaldi: command not found
That is because it is the wrong command. After typing “vivaldi” presssing tab would have autocompleted from the name of symlink in “/usr/bin”, i.e. vivaldi-stable

Quote:
Originally Posted by globetrotterdk View Post
Code:
# ./vivaldi-bin
bash: ./vivaldi-bin: No such file or directory
Because you are not in “/opt/vivaldi/” when you type it.

It would be the wrong way to start anyway, since you bypass the startup wrapper which does some tests and sets up variables.

Quote:
Originally Posted by BW-userx View Post
you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications
No need since a symlink is already setup and there is a desktop file already present and working.

Quote:
Originally Posted by globetrotterdk View Post
Code:
# removepkg vivaldi

No such package: /var/log/packages/vivaldi. Can't remove.
so that I could try building and install it on Slackware. How do I remove the package?
Use the correct package name (vivaldi-stable)

Quote:
Originally Posted by BW-userx View Post
[…]did not get any kind of nss errors did see this though,
Code:
  8375 2018-02-26 20:17 usr/share/applications/vivaldi-stable.desktop
EDIT:
I lied due to misinformation. It is not there. It is located here
Code:
$ sudo find / -name vivaldi-stable.desktop
/tmp/repackage-vivaldi-stable/pkg/usr/share/applications/vivaldi-stable.desktop
find: `/home/userx/.gvfs': Permission denied
No it really is there. Did you check this after you had uninstalled? From my own system:

Code:
$ ls -l /usr/share/applications/vivaldi-stable.desktop
-rw-r--r-- 1 root root 8375 Mar 21 14:52 /usr/share/applications/vivaldi-stable.desktop
$ grep \.desktop /var/log/packages/vivaldi-stable-1.14.1077.60-x86_64-1ro 
usr/share/applications/vivaldi-stable.desktop
usr/share/xfce4/helpers/vivaldi.desktop

Last edited by ruario; 04-18-2018 at 05:54 AM.
 
1 members found this post helpful.
  


Reply



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
LXer: Vivaldi Continues To Build Amazing Features With Vivaldi 1.11 LXer Syndicated Linux News 0 08-12-2017 06:09 PM
LXer: Released Vivaldi Web Browser Stable 1.7 With Built-in Screenshot & All Tab Mute Options LXer Syndicated Linux News 0 02-11-2017 12:32 AM
LXer: Vivaldi 1.7 Web Browser Is Out with Built-In Screenshot Tool, New Options LXer Syndicated Linux News 0 02-08-2017 04:24 PM
[SOLVED] Bash script overwriting file unintentionally scorchgeek Programming 8 08-18-2011 10:19 PM
Installpkg of a package built w/ src2pkg places the executable in /tmp/... Alexvader Slackware 20 11-05-2009 09:06 AM

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

All times are GMT -5. The time now is 10:57 AM.

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