Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-05-2003, 09:17 PM
|
#1
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Rep:
|
snes9express and normal users
Im having trouble running snes9express as a normal user.
snes9express is a frontend for the nes emulator snes9x.
As a normal user, I can run snes9x romname.xxx and it runs fine. When I try to run the frontend snes9express, i get:
Segmentation Fault,
Both run fine as root. So I think this is a permissions issue. The problem is, I don't know where to start.. Is there a way I can find out what files a program is trying to use?
Any help appreciated.
Thanks,
Murray
|
|
|
12-05-2003, 09:24 PM
|
#2
|
Senior Member
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307
Rep:
|
Quote:
Is there a way I can find out what files a program is trying to use?
|
ldd filename
|
|
|
12-06-2003, 03:07 PM
|
#3
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
cool..
i ran that..
here's the output:
murray@godzillax:~$ ldd /usr/local/bin/snes9express
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x40028000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x4027e000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x402ea000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x40305000)
libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x40318000)
libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x40339000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x40346000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x4037a000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x403af000)
libdl.so.2 => /lib/libdl.so.2 (0x403b3000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x403b6000)
libz.so.1 => /usr/lib/libz.so.1 (0x40420000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4042d000)
libm.so.6 => /lib/libm.so.6 (0x404df000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x40502000)
libc.so.6 => /lib/libc.so.6 (0x4050a000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40640000)
libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x40707000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4070b000)
libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x4071a000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4072c000)
libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0x40734000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4075b000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x407bf000)
is the best way to fix this to go into each dir and change the rights of all of these files?
THanks again,
Murray
|
|
|
12-06-2003, 08:46 PM
|
#4
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
still get segmentation fault after doing:
chmod a+rwx /usr/lib/*so*
chmod a+rwx /usr/X11R6/lib/*so*
chmod a+rwx /lib/*so*
any suggestions?
|
|
|
12-10-2003, 12:40 AM
|
#5
|
LQ Newbie
Registered: Dec 2003
Location: Nova Scotia
Distribution: Mandrake
Posts: 4
Rep:
|
Did snes9express run in your user account the first time you tried it, but seg-fault everytime after? If so, it might be related to the preferences file that it creates.
At a command prompt in your home directory, type: ls .s9x
If it lists a file called "prefs" in that directory, try renaming it to prefs.bak, and see if snes9express runs then. If that works, what are the contents of the file that prefs.bak file?
(if that doesn't work, but there is a "profiles" file, or a "last" file, try renaming them in the same way)
If snes9express has never run in your user account, then I believe you may have been (un)fortunate enough to have discovered a bug in snes9express. Actually, either way, it sounds like a bug. If you feel up to helping, tracing a seg-fault isn't too hard. (Whether it's easy for me to fix... that's a whole other story)
In a terminal, as your user account, go to the directory where you built snes9express (with configure and make). Then run the command: gdb snes9express
you'll then get a gdb prompt, type run
as soon as it crashes, it should give you another gdb prompt. type: bt
The output given from that command should help me find the problem.
To get out of gdb, type quit
|
|
|
12-10-2003, 01:48 AM
|
#6
|
Senior Member
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307
Rep:
|
Quote:
Originally posted by murray_linux
still get segmentation fault after doing:
chmod a+rwx /usr/lib/*so*
chmod a+rwx /usr/X11R6/lib/*so*
chmod a+rwx /lib/*so*
any suggestions?
|
OMG... why did you do that? Just in case you don't realize it, you've just made your system more insecure by a few notches. It'll be hell to undo what you've done
Usually in Linux, if an app segfaults it's almost always the fault of the app.
|
|
|
12-10-2003, 10:38 AM
|
#7
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
Quote:
Originally posted by Azmeen
OMG... why did you do that? Just in case you don't realize it, you've just made your system more insecure by a few notches. It'll be hell to undo what you've done
|
i did it because i didn't know any better. this is a learning process.
ok so i know it's a bad thing now. can you elaborate? thank you.
|
|
|
12-10-2003, 10:41 AM
|
#8
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
daven thank you kindly for your reply. i will test this out later this week
Murray
|
|
|
12-10-2003, 07:23 PM
|
#9
|
Senior Member
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307
Rep:
|
Quote:
Originally posted by murray_linux
i did it because i didn't know any better. this is a learning process.
ok so i know it's a bad thing now. can you elaborate? thank you.
|
Sorry I wasn't more clear in my response... OK, I'll try my best to explain.
Basically, what you did was to give everybody full permissions to all of your libs. It means, that if by someone gains access to your libs they can do all kinds of nasty stuff... plant backdoors, use your comp to launch DDOS attacks, or just simply render your box useless.
|
|
|
12-10-2003, 10:54 PM
|
#10
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
thanks azmeen.
|
|
|
12-10-2003, 11:34 PM
|
#11
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
Quote:
Originally posted by daven
Did snes9express run in your user account the first time you tried it, but seg-fault everytime after?
|
I really don't rememeber, sorry. But the Seg fault is now happening when I run the program as root too Recompile doesn't fix it either.
Quote:
try renaming it to prefs.bak, and see if snes9express runs then. If that works, what are the contents of the file that prefs.bak file?
|
Same error.
Quote:
(if that doesn't work, but there is a "profiles" file, or a "last" file, try renaming them in the same way)
|
Renaming last to last.old in root's .s9x directory made snes9express run for both root and my user. YES!!!!! Here's what was in my "last" file:
/home/murray/bin/snes9x -ntsc -fullscreen -dfr -joymap1 1 4 2 5 6 7 0 3 /mnt/cdw
riter/ROM/SuperMetroid+%28US%29.zip
Xlib: extension "XFree86-DGA" missing on display ":0.0".
Rate: 48000, Buffer size: 2048, 16-bit: yes, Stereo: yes, Encoded: no
Found ROM file header (and ignored it).
"Super Metroid" [bad checksum] LoROM, 32Mbits, Type: ROM+RAM+BAT, Mode: 20, TV:
NTSC, S-RAM: 8KB, ROMId: ???? Company: 01 CRC32: 806D0D0B
Using Microsoft SideWinder Game Pad Pro USB version 1.0 (/dev/js0) as pad1.
Quote:
In a terminal, as your user account, go to the directory where you built snes9express (with configure and make). Then run the command: gdb snes9express
you'll then get a gdb prompt, type run
as soon as it crashes, it should give you another gdb prompt. type: bt
The output given from that command should help me find the problem.
To get out of gdb, type quit
|
I guess you don't need this anymore, but here's my output as root:
(gdb) bt
#0 0x0805a652 in fr_ArgList (this=0x20202020,
s=0xbffff2e0 ' ' <repeats 200 times>...) at frend.cc:104
(gdb) quit
The program is running. Exit anyway? (y or n) y
Thank you so much for your help on this. I truly appreciate it.
Last edited by murray_linux; 12-10-2003 at 11:36 PM.
|
|
|
12-11-2003, 12:52 PM
|
#12
|
Member
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210
Original Poster
Rep:
|
Azmeen,
Yeah that could be bad. How would 1 go about fixing a mistake like that?
Thanks,
Murray
|
|
|
12-20-2003, 03:56 PM
|
#13
|
LQ Newbie
Registered: Dec 2003
Location: Nova Scotia
Distribution: Mandrake
Posts: 4
Rep:
|
Thanks for the gdb debugging help Murray. It should help me track down the cause of the problem.
Regarding your other question, you should be able to restore the proper library permissions by doing this:
chmod 755 /usr/lib/*so*
chmod 755 /usr/X11R6/lib/*so*
chmod 755 /lib/*so*
|
|
|
All times are GMT -5. The time now is 09:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|