WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: openbox plus & a permissions prob  (Read 3627 times)

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
openbox plus & a permissions prob
« on: November 05, 2010, 06:29:11 AM »
I have installed mc onto a usb device and configured it with an openbox/tint2/conky desktop. From the beginning I had difficulties running certain apps [chromium for example] which could not access the .config folder in the home directory. This was easily remedied on my system with a persistent home by simply changing the permissions from root to tc on the .config dir. However when I boot tiny core [tc 3.2] with the norestore option I find that I have to change the permissions on the .config folder each time I boot the system - a major pita!

Surmising that the openbox plus extension is not setting the correct permissions I gamely decided to unsquashfs the openbox extension entered the /usr/local/bin [I think] directory and tweaked the openbox initmenu script. Basically I changed the line:

chown -R $USER:staff /home/$USER/.config/openbox

to

chown -R $USER:staff /home/$USER/.config

This did the trick and the norestore version now boots and chromium runs.

The problem is the persistent version now boots into conky etc but without openbox - I have to cntrl/alt/del to get out of it.

Not sure how this tweak could have caused this or perhaps it was during the mksquashfs phase that something went awry.

Have got a full backup solution so restoring is not a prob. Just would like to get to the bottom of it really.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: openbox plus & a permissions prob
« Reply #1 on: November 05, 2010, 08:12:26 AM »
Something is clearly changing the owner to root, it might not be openbox. Do you have any other extensions that touch .config in their startup scripts?
The only barriers that can stop you are the ones you create yourself.

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: openbox plus & a permissions prob
« Reply #2 on: November 05, 2010, 08:35:30 AM »
Well that could be tricky troubleshooting - the apps using the .config are:

chromium, geany, geeqie,leafpad,nitrogen,pcmanfm2,sakura,smplayer,tint2, transmission, xarchiver,

However the permissions prob seemed quite early on in my build phase since chromium refused to run and geany complained about configuration probs although it still ran ok. That's when I changed the permissions and rebooted with 'persistence'.

Since the main persistent version is running sweetly and the version without persistence runs but with niggles perhaps there is a clunky workaround. Could I, for example, create a file in /home/tc/.X.d that simply ran the command 'sudo chown -R tc:staff /home/tc/.config' and then convert it to an extension to be mounted from the /tce/optional folder? This might be the quickest fix for now.

I'm just not sure how you might convert '/home/tc/.X.d/chngpm_config', say, into an extension that would mount at boot time.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: openbox plus & a permissions prob
« Reply #3 on: November 05, 2010, 08:50:30 AM »
grep .config /usr/local/tce.installed/*
The only barriers that can stop you are the ones you create yourself.

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: openbox plus & a permissions prob
« Reply #4 on: November 05, 2010, 09:20:19 AM »
Yep, as follows:
Code: [Select]
tc@box:~$ grep .config /usr/local/tce.installed/*
/usr/local/tce.installed/MPlayer-svn-gtk2:USER=`cat /etc/sysconfig/tcuser`
/usr/local/tce.installed/Xorg-7.5:echo "Xorg" > /etc/sysconfig/Xserver
/usr/local/tce.installed/alsa:USER=`cat /etc/sysconfig/tcuser`
/usr/local/tce.installed/bash:TCHOME=`cat /etc/sysconfig/tcuser`
/usr/local/tce.installed/gnome-icon-theme:tcuser=`cat /etc/sysconfig/tcuser`
/usr/local/tce.installed/gtk-engines:tcuser=`cat /etc/sysconfig/tcuser`
/usr/local/tce.installed/nvidia-glx:ldconfig
/usr/local/tce.installed/openbox:ls /usr/local/tce.installed | grep "LXDE" || echo "openbox" > /etc/sysconfig/desktop
/usr/local/tce.installed/tint2:if [ ! -d $HOME/.config/tint2 ]; then
/usr/local/tce.installed/tint2:  mkdir -p $HOME/.config/tint2
/usr/local/tce.installed/tint2:  chown tc:staff $HOME/.config/tint2
/usr/local/tce.installed/tint2:if [ ! -f $HOME/.config/tint2/tint2rc ]; then
/usr/local/tce.installed/tint2:  cp -p /usr/local/etc/xdg/tint2/tint2rc $HOME/.config/tint2/tint2rc

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: openbox plus & a permissions prob
« Reply #5 on: November 05, 2010, 10:58:35 AM »
Looks like tint2 is the culprit. I've updated the extension.
The only barriers that can stop you are the ones you create yourself.

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: openbox plus & a permissions prob
« Reply #6 on: November 05, 2010, 08:26:36 PM »
Updated the tint2 but no change vis a vis .config

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: openbox plus & a permissions prob
« Reply #7 on: November 07, 2010, 04:47:52 AM »
Still haven't resolved this issue but I still think openbox changes ownership of the openbox folder whilst leaving the .config with root:staff ownership. This does not appear to affect other extensions that mount configuration folders into the .config at boot but it does affect apps that need to access the .config on a first run basis (e.g. chromium)

However since this is not a critical issue for me and nobody seems much flustered I have opted for a workaround. I remastered the tinycore-current.iso with some adjustments for screen res, background, and a script in .X.d to change ownership of the .config.

I have sought to build from microcore a system configured with the nvidia driver to resemble as closely as possible in functionality of the archbang 'reloaded' distro. At the same time I wanted a generic version to boot up any machine that tc base was capable of and I wanted a read-only version for 'paranoid' surfing.

The remastered tc iso weighs in at 20mb whilst the total space occupied by the three versions now stands at 270mb leaving 230mb out of a 500mb partition on the usb stick (8gb) with a 7gb data partition.

Surely this is testimony to the fact that many linux distros are suffering from unnecessary amounts of bloat - the archbang on my system has gone past the 5gb mark although I have not run the full clear out of old packages that becomes a feature of arch linux systems.

So for me tc continues to impress - many thanks to the team for their efforts!


Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: openbox plus & a permissions prob
« Reply #8 on: November 07, 2010, 07:10:28 AM »
Yes I have observed this also, it has caused problems from time to time, but not having expert knowledge I always managed to kludge past it. For my usb stick tc setup I have a chown statement in bootlocal.sh to fix up the entire /home/tc folder, but this does not seem necessary in my hard disk setup; why, I don't know.

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: openbox plus & a permissions prob
« Reply #9 on: November 07, 2010, 02:21:45 PM »
Jur

Yes I tried the bootlocal.sh file first for my chown command but it did not work - I suspect commands in this file may run well before the desktop is properly up and running and fully configured. The .X.d hidden folder in the home directory will run any file and its commands contained within and they don't have to have executable permissions.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: openbox plus & a permissions prob
« Reply #10 on: November 07, 2010, 04:32:05 PM »
I just made an adjustment to openbox as per this thread.
Tested with a clean install of openbox, chromium, flash, and OSS.
Setup and passed the You Tube test. It is now available in the repository.
10+ Years Contributing to Linux Open Source Projects.