-   Slackware (
-   -   Environment variable - only root can log in graphically, lots of programs won't start (

Pscylo 09-06-2012 11:49 AM

Environment variable - only root can log in graphically, lots of programs won't start
Like it says on the tin. Since yesterday evening, I've been unable to log in graphically as a regular user though root can do so successfully (if you log in as a user the screen goes black and cycles back to the login screen). I'm assuming I hosed something last night though I was only messing with a DVB stick and was installing patch-utils etc I can't think of anything that would cause the problems I have.

I can log in graphically as root, and can su to a regular user. All files are still there but although I can successfully run ls, cd, vi I can't run vim, mc, pine, opera and mplayer (says command not found).

If I su to a regular user it doesn't appear that I can su back to root. I may be typing the password wrong, but doubt I could consistently make the same error.

The path env variable for users seems very short comparing to root's env variable.

For users:


For root:


naturally if I then su (from root - can't do it from a regular user account) the path variable reduces considerably since it's not reading the full environment.

I added a new user, and it seems to come encumbered with the same problems. My guess is that I'm looking for a path/permission issue here as I think the lack of login is no more than a symptom of x not starting (startx manually results in "command not found") and various programs not starting is likely to be as a result of path/permission if it works fine for root.

Any ideas?

amani 09-06-2012 12:24 PM

.ICEauthority permission?

But seems to be a more complicated mess.
What did you install?

Alien Bob 09-06-2012 12:31 PM

Did you mess up permisisons of /tmp ? (fixed with the command "chmod 1777 /tmp").
Did you install a package for the wrong architecture? Did you install a Slackware package at all or compile some program manually?
What is the output of "uname -a" and "ls -lart /var/log/packages |tail -20" ?

Many more roads to follow but let's see these results first.


Pscylo 09-06-2012 01:02 PM


bash-3.1# ls -lart /var/log/packages |tail -20
-rw-r--r--  1 root root  23736 2012-01-12 14:42 wxGTK-2.8.9-i486-1_SBo
-rw-r--r--  1 root root    1066 2012-01-21 11:55 remind-03.01.11-i486-1_SBo
-rw-r--r--  1 root root  11279 2012-01-31 21:15 irssi-0.8.12-i486-1
-rw-r--r--  1 root root    1973 2012-02-12 15:40 flash-player-plugin-
-rw-r--r--  1 root root    870 2012-03-02 21:46 memtest86-4.0a-i486-1_SBo
-rw-r--r--  1 root root    2553 2012-03-03 19:08 lshw-B.02.13-i486-1_SBo
-rw-r--r--  1 root root    6137 2012-03-05 23:55 apache-ant-1.7.1-i586-1bj
-rw-r--r--  1 root root  17963 2012-03-23 20:23 qucs-0.0.16-i486-1_SBo
-rw-r--r--  1 root root    4522 2012-03-24 20:24 mathomatic-15.6.4-i486-1_SBo
-rw-r--r--  1 root root  103312 2012-03-25 00:28 maxima-5.24.0-i486-1_SBo
-rw-r--r--  1 root root    1541 2012-04-25 22:41 jaolt-
-rw-r--r--  1 root root    1247 2012-05-30 16:48 sqlite-3.6.2-i486-1_SBo
-rw-r--r--  1 root root    986 2012-05-31 13:07 stfl-0.22-i486-1_SBo
-rw-r--r--  1 root root    2885 2012-05-31 13:11 json-c-0.9-i486-1_SBo
-rw-r--r--  1 root root    2710 2012-05-31 13:16 newsbeuter-2.5-i486-1_SBo
-rw-r--r--  1 root root  33270 2012-08-31 00:09 cinepaint-0.22.1-i486-3sl
-rw-r--r--  1 root root  12091 2012-09-05 19:21 dvb-apps-20080512-i686-1an
-rw-r--r--  1 root root    1506 2012-09-05 20:46 patchutils-0.3.0-i486-1_SBo
drwxr-xr-x  2 root root  69632 2012-09-06 08:49 .
drwxr-xr-x 15 root root    4096 2012-09-06 10:23 ..


bash-3.1# uname -a
Linux Pscylo #3 SMP Wed May 30 14:46:57 BST 2012 i686 Intel(R) Core(TM)2 Duo CPU    T5670  @ 1.80GHz GenuineIntel GNU/Linux

No apparent difference with chmod 1777 /tmp

ReaperX7 09-06-2012 01:10 PM

Try adding your primary User account to the "Wheel" group.

Pscylo 09-06-2012 02:51 PM

Well I've solved the "su"ing problem. Still have the running programs/logging in problem to do.

Alien Bob 09-06-2012 03:11 PM

It's always polite to tell the people who are trying to help you, how you solved your issues.


Pscylo 09-06-2012 03:11 PM

Some more info. I can share the home directory with a dual bootable 64 bit install of Slackware, and it appears that pine (for example) will run fine. Starting X up is a problem on the 64bit install but I think that's unrelated to the issues I'm having here (throws an error about timing out on Xauthority files). The point is that the console software started up fine which implies there's nothing wrong with/in the home directory.

Other than that from a terminal that I su'd to a user account:


bash-3.1$ pine
bash: pine: command not found
bash-3.1$ which vi
bash-3.1$ which vim
which: no vim in (/usr/local/bin:/bin:/usr/bin)
bash-3.1$ which startx
which: no startx in (/usr/local/bin:/bin:/usr/bin)

And directly from the root account:


bash-3.1# which vi
bash-3.1# which vim
bash-3.1# whoami
bash-3.1# which startx

which seems some indication of the oddness since root can start a program such as /usr/bin/vim but the user account reports that "no vim in (/usr/local/bin:/bin:/usr/bin)" which is clearly not the case since root runs /usr/bin/vim.

If I try and run it by the full path from the user account, I get this:


bash-3.1$ /usr/bin/vim
bash: /usr/bin/vim: Permission denied

Which would imply permission since the path seems to be included within the user account.

Pscylo 09-06-2012 03:13 PM


Originally Posted by Alien Bob (Post 4774425)
It's always polite to tell the people who are trying to help you, how you solved your issues.


suid I think. Changing the permissions of su to rws rather than rwx.

Pscylo 09-06-2012 03:31 PM

Yes, it was permissions. The permission on /bin were set quite differently to /usr/bin so I replicated them. Not sure if the permissions are set correctly now, but I'll double check it against a fairly virginal install later. This is hardly a production machine anyway so I'm sure it will be fine in the sort term.

Anyway, marked as solved.

All times are GMT -5. The time now is 09:13 PM.