View previous topic :: View next topic |
Author |
Message |
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Fri Jan 04, 2019 12:54 am Post subject: [solved] newly emerged firefox, only runs as su |
|
|
Wow it took a long time to emerge and compile all of that. I didn't go for the binary.
But it seems to work pretty great! Provided I run it as root, that is. If I try executing
as a normal user, I get
Code: | normaluser@localhost ~ $ firefox
Segmentation fault |
I saw a thread of people recommending to unmerge gconf and delete the directories and then re-emerging gconf, but I actually didn't even have gconf to begin with. So I emerged it, and it didn't change anything.
Last edited by Gen3Hunna on Fri Jan 04, 2019 11:48 pm; edited 2 times in total |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Fri Jan 04, 2019 1:12 am Post subject: |
|
|
1) Which version of Firefox did you install?
2) Please post the output of 'emerge --info'
3) Does Firefox also crash if you start it with a new (empty) profile?
Code: | cd ~
mv .mozilla .mozilla.backup
ls -la .mozilla .mozilla.backup # Make sure the 'mv' worked
firefox # What happens?
rm -rf .mozilla
mv .mozilla.backup .mozilla |
|
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Fri Jan 04, 2019 1:21 am Post subject: |
|
|
Hello. I installed firefox 60.4.0esr (64-bit)
Changing profile/using empty one did not change anything. (Same behavior occured as in OP)
emerge--info
Code: | # emerge --info
Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop, gcc-7.3.0, glibc-2.27-r6, 4.14.83-gentoo x86_64)
=================================================================
System uname: Linux-4.14.83-gentoo-x86_64-Intel-R-_Core-TM-_i7-3740QM_CPU_@_2.70GHz-with-gentoo-2.6
KiB Mem: 24617008 total, 23470672 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Sat, 29 Dec 2018 00:45:01 +0000
Head commit of repository gentoo: 855ec577710c09d97a80fad38c066b41e2eea9fa
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash: 4.4_p12::gentoo
dev-lang/perl: 5.24.3-r1::gentoo
dev-lang/python: 2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake: 3.9.6::gentoo
dev-util/pkgconfig: 0.29.2::gentoo
sys-apps/baselayout: 2.6-r1::gentoo
sys-apps/openrc: 0.38.3-r1::gentoo
sys-apps/sandbox: 2.13::gentoo
sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake: 1.16.1-r1::gentoo
sys-devel/binutils: 2.30-r4::gentoo
sys-devel/gcc: 7.3.0-r3::gentoo
sys-devel/gcc-config: 2.0::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.27-r6::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-extra-opts:
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 24
sync-rsync-verify-jobs: 1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alisp alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr clang cli compat consolekit crypt cups cxx dbus dri driver dts dvd dvdr emboss eme-free emerge encode eselct exif fam flac fortran gdbm geckodriver gif glamor gles gles2 gmp-autoupdate gpm gtk gtk3 hwaccel iconv ipv6 jack jpeg kms lcms ldap libnotify libtirpc list lto mad mng mp3 mp4 mpeg multilib ncurses nls nptl nsplugin nvidia-drivers ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt5 readline screenshot sdl seccomp spell sqlite ssl startup-notification static-libs svg system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite tcpd thread-safety tiff tools truetype udev udisks unicode upower usb uvm vorbis wayland wayland? wifi wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
|
|
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Fri Jan 04, 2019 2:10 am Post subject: |
|
|
I don't see anything totally wrong in the output of 'emerge --info'.
Are there any messages in the log files (/var/log/... or journalctl -e) after the segfault?
Could it be related to the use flags below?
Code: | system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite |
I don't use those use flags for two reasons:
- There's probably a reason why Mozilla ships Firefox with their own version of the libraries
- Using system libraries may cause frequent rebuilds of Firefox - something I don't want
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Fri Jan 04, 2019 2:20 am Post subject: |
|
|
Please collect and post a backtrace of the crash.
Using system libraries is generally correct. Switching to the bundled versions is only advisable if you suspect that upstream has broken their support for system libraries. We don't have any indication of that yet. |
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Fri Jan 04, 2019 2:49 am Post subject: |
|
|
Hello, thank you Hu. I'm not sure what you mean by "Please collect and post a backtrace of the crash." I'm very new to Gentoo. Firefox isn't crashing, because I can't get it to start. If I execute firefox as a non root user, it doesn't start, it only returns in the terminal "Segmentation fault." This is the first time I've ever installed FF on Gentoo. It's running perfectly as a root user, though. No issues at all. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Jan 04, 2019 10:27 am Post subject: |
|
|
Gen3Hunna wrote: | It's running perfectly as a root user, though. | What you should avoid.
Please could you emerge "strace" and run - as non-root user - Code: | strace -o strace.log firefox | and post here the relevant part (or the link got from wgetpaste)? |
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Fri Jan 04, 2019 10:57 am Post subject: |
|
|
Also I ran this code because someone said it would keep me up to date:
Code: | emerge -uUD --ask --newuse --keep-going --with-bdeps=y @world |
(I really don't know for sure what that command did) but it rebuilt everything it seems, including FF. No changed behavior after. Although that took a really damn long time. And then FF rebuilt. Lol
Here is the pastebin: https://paste.ee/p/EEZIm |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Fri Jan 04, 2019 12:18 pm Post subject: |
|
|
When you do plain su (not su -) you will be root in users home directory. Some applications write back their conf files every time they terminate, meaning you may create conf files owned by root in your home. You could run chown recursively on your home directory to make sure there are no files owned by root and never use plain su again.
If you create a new test user, will Firefox run? _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Fri Jan 04, 2019 10:36 pm Post subject: |
|
|
What settings do you recommend I create the new user with? Because the new user that isn't working was made with the wiki
Code: | useradd -m -G users,wheel,audio -s /bin/bash larry |
default suggestions. I'm starting to wonder if these permissions aren't correct. For example, I'm not in the video group. Yet I am able to run startx.
edit: I made a new user with a few more groups. It works. By the way, when you say never use su again I assume you mean just for Firefox never use it again.. I'm glad the new user works. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sat Jan 05, 2019 2:06 am Post subject: |
|
|
He said never use plain su again, and meant exactly that. Implicitly, you should instead run /bin/su -, so that you get a clean environment for your root shell. |
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Sat Jan 05, 2019 3:01 am Post subject: |
|
|
Interesting, I've never really read much about su/ vs su -.
Have I created a mess in my system by using su and/or su -interchangably? I'm sure I've ran a lot of commands with both. I didn't even know until now that they weren't just the same command.
Why does Gentoo still support su if it shouldn't be used? See, this is why I wanted to switch to Gentoo since forever, now. I felt like the nuance was optional. Here you have to know it. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Jan 05, 2019 3:18 am Post subject: |
|
|
There are cases when su can be used, say, I want to test some application and I build it as user. Then I do su in build directory and execute 'make install'. But I could do same with 'su -', I just need to navigate into build directory beforehand in this case, so plain su will save me a few keystrokes. You chose to ignore may advice about running chown recursively on your home directory? _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Sat Jan 05, 2019 4:29 am Post subject: |
|
|
I had some difficulty placing the context of your chown recommendation. I don't know this command. I ran chown -R in my home directory and I got "Missing operand." The --help isn't helping me very much.
I still have some "permission denied" reports for various directories when I use Firefox in the new account (if I Control+F1 inside X) but other than that Firefox works as the new user.
stuff like "dconf-WARNING unable to open /usr/local/share/dconf/profile/user (pemission denied)."
I didn't really ignore your advice, I just had not enough experience to contextualize the unfamiliar command. I'm just really wishing I had ventured into this [Gentoo] a long time ago. Because clearly most of my Linux years have been wasted on superficial knowledge, most of which is acquired in the first 10 minutes of installing Gentoo. While I don't feel wildly lost in all of this, it's just clear how much time I wasted. I'd be a lot less lost if I had actually learned how linux works, to start with. But wow, to even call myself a linux user before almost seems like an insult, now.
re SU: I won't run su ever again, I'm just still really curious about what discrepencies I have introduced now by using that (and wondering if I should just reinstall my whole system, now, because I've definitely been using those commands interchangably on all my installations for like 10 years now) |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2964 Location: Edge of marsh USA
|
Posted: Sat Jan 05, 2019 4:39 am Post subject: |
|
|
Although not about Firefox, I don't think I've ever run "su -". I've been using just su almost daily for a 15 years for system maintenance and updates on over a dozen machines without issue. I should change? _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Gen3Hunna n00b
Joined: 31 Dec 2018 Posts: 29
|
Posted: Sat Jan 05, 2019 4:39 am Post subject: |
|
|
--> (Don't ask me, LOL)
If it's literally just about changing directories, then yes, of course I've noticed that su leaves me at the directory I log in as an su - changes me to root's ~homdir. Other than that I am not aware of a difference |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2964 Location: Edge of marsh USA
|
Posted: Sat Jan 05, 2019 4:48 am Post subject: |
|
|
Gen3Hunna, the command would be:
Code: | chown -R username:groupname /home/username |
This will ensure that you and your chosen group own all of the files in your home directory.
FYI, my firefox is built with the following:
Code: | [ebuild R ] www-client/firefox-60.4.0::gentoo USE="dbus gmp-autoupdate screenshot startup-notification -bindist -clang -custom-cflags -custom-optimization -debug -eme-free -geckodriver -hardened -hwaccel -jack (-neon) -pulseaudio (-selinux) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -test -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB |
I only switched from firefox-bin to firefox recently to avoid pulseaudio. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Jan 05, 2019 5:55 am Post subject: |
|
|
figueroa wrote: | Although not about Firefox, I don't think I've ever run "su -". I've been using just su almost daily for a 15 years for system maintenance and updates on over a dozen machines without issue. I should change? |
Probably not, system maintenance is not running user applications, in other words, you use elevated rights sensibly. I'd still recommend to use 'su -' instead of 'su'. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Jan 05, 2019 4:56 pm Post subject: |
|
|
figueroa wrote: | Although not about Firefox, I don't think I've ever run "su -". I've been using just su almost daily for a 15 years for system maintenance and updates on over a dozen machines without issue. I should change? |
I recall having a problem once and on the forum was told that there is an environment difference too. Mostly it doesn't matter. I don't normally use "su -" unless I'm actually going to work in the root directory, but at least once, I had different behavior between "su -" and "su".
EDIT:
Like if I want to mount or unmount something, I'll just su, do my work and exit back to the user shell. I get tired of always having to "sudo lspci" and such. |
|
Back to top |
|
|
niku n00b
Joined: 23 Dec 2018 Posts: 38
|
Posted: Sun Jan 06, 2019 6:40 am Post subject: |
|
|
About su and su -, here is what the su manpage says [Note: "-" is the short form of "--login root"]:
Code: | The $HOME, $SHELL, $USER, $LOGNAME, $PATH, and $IFS environment variables are reset.
If --login is _not used_, the environment is copied, except for the variables above.
If --login is used, the $TERM, $COLORTERM, $DISPLAY, and $XAUTHORITY environment variables are copied if they were set.
If --login is used, the $TZ, $HZ, and $MAIL environment variables are set according to the /etc/login.defs options ENV_TZ, ENV_HZ, MAIL_DIR, and MAIL_FILE (see below).
If --login is used, other environment variables might be set by the ENVIRON_FILE file (see below).
|
Also,
Code: | The - option may be used to provide an environment similar to what the user would expect had the user logged in directly. |
When not used,
Code: | The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the superuser. |
So, if you *truly* want to act like the user you are switching to, you use "-". With su, you just get a bland PATH.
I didn't even know there was a difference! Thanks, Jaglover! |
|
Back to top |
|
|
|