WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: LXDE Displays Unwanted wbar  (Read 8644 times)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
LXDE Displays Unwanted wbar
« on: February 08, 2010, 03:15:22 PM »
After installing Openbox/LXDE on TC, wbar is displayed each time startx has run.  A right-click on wbar removes it without any problem.  Is there a fix posted anywhere for this?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: LXDE Displays Unwanted wbar
« Reply #1 on: February 08, 2010, 03:17:50 PM »
The bootcode "noicons"
The only barriers that can stop you are the ones you create yourself.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: LXDE Displays Unwanted wbar
« Reply #2 on: February 08, 2010, 04:46:14 PM »
Simple when you know how.  Thanks

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: LXDE Displays Unwanted wbar
« Reply #3 on: February 11, 2010, 05:17:25 AM »
When using Openbox and LXDE, is there a command that can be added to /opt/bootlocal.sh which performs the same function as the bootcode "noicons"?

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: LXDE Displays Unwanted wbar
« Reply #4 on: February 11, 2010, 07:39:17 AM »
If using the "noicons" bootcode is not desired, you can edit ~/.xsession and either comment out or remove the line
Code: [Select]
[ "$ICONS" == "wbar" ] && /usr/bin/wbar.sh

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: LXDE Displays Unwanted wbar
« Reply #5 on: February 11, 2010, 09:12:12 AM »
If using the "noicons" bootcode is not desired, you can edit ~/.xsession and either comment out or remove the line
Code: [Select]
[ "$ICONS" == "wbar" ] && /usr/bin/wbar.sh
Thanks for the useful pointer.

If I understand correctly, the use of the bootcode "noicons" prevents the creation of a variable "ICONS" which is then used in ~/.xsession.  Is it possible to boot without using the bootcode "noicons" and unset the variable "ICONS" with a command issued from /opt/bootlocal.sh?

I am not against commenting out the appropriate line in ~/.xsession but I try to keep the number of manually edited files to a minimum.  I have created other entries in /opt/bootlocal.sh and would also like to use it for this purpose if possible.

If this is a workable idea, how would the command be constructed to unset "ICONS"?
 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: LXDE Displays Unwanted wbar
« Reply #6 on: February 11, 2010, 09:26:13 AM »
You can also kill WBAR process in the script, either in bootlocal.sh or ad to LXDE startup. However it is better not to start WBAR than start and kill. But works.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: LXDE Displays Unwanted wbar
« Reply #7 on: February 11, 2010, 09:48:44 AM »
You can also kill WBAR process in the script, either in bootlocal.sh or ad to LXDE startup. However it is better not to start WBAR than start and kill. But works.
I am uncertain how to do this.  In a root console "kill wbar" generates 'bad pid wbar'.

I would still also like to learn how to unset $ICONS.

Edit:
I have tried adding
Code: [Select]
unset ICONSto bootlocal.sh without success.
 
« Last Edit: February 11, 2010, 09:57:02 AM by SamK »

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: LXDE Displays Unwanted wbar
« Reply #8 on: February 11, 2010, 11:06:50 AM »
Quote
Is it possible to boot without using the bootcode "noicons" and unset the variable "ICONS" with a command issued from /opt/bootlocal.sh?
No, because bootlocal.sh is a child script. Any changes to environment variables within it do not affect the init process.

If you do not want wbar to start, there is a hack (I verified it works on 2.8.1):
1) Open a root terminal.
2) rm -f /usr/share/wbar/dot.wbar
3) ln -s foo /usr/share/wbar/dot.wbar
4) Add usr/share/wbar/dot.wbar to /opt/.filetool.lst and make a backup

The key to this is that dot.wbar is now a symbolic link to a file which does not exist. This link in the backup will be restored on bootup before the following code is executed:

if [ -n "$NOICONS" ] || [ ! -f /usr/share/wbar/dot.wbar ]; then
   unset ICONS
fi

This will unset ICONS in the appropriate place and prevent wbar from starting.

Alternatively, you can create a "no-wbar" extension to remove the dot.wbar file:
1) Load squashfs-tools extension using Appbrowser.
2) Open a root terminal.
3) mkdir -p /tmp/no-wbar/usr/local/tce.installed/
4) echo rm -f /usr/share/wbar/dot.wbar > /tmp/no-wbar/usr/local/tce.installed/no-wbar
5) chmod +x /tmp/no-wbar/usr/local/tce.installed/no-wbar
5) mksquashfs /tmp/no-wbar /tmp/no-wbar.tcz -b 4096

Then, for TC 2.7 and earlier:
6) Copy no-wbar.tcz to your tce directory

Or for 2.8 and later:
6) Copy no-wbar.tcz to your tce/optional directory
7) Add "no-wbar.tcz" to tce/onboot.lst

There may be users like you which for one reason or another cannot use the noicons boot parameter,  so I will submit this extension to Jason for consideration. It's a bit of a hack, though, so no guarantees on acceptance. :)

Quote
However it is better not to start WBAR than start and kill.
True, but if you wish to try this, here is what you can add to bootlocal.sh:

while ! pidof wbar &>/dev/null; do sleep 1; done; killall wbar
« Last Edit: February 11, 2010, 11:29:36 AM by danielibarnes »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: LXDE Displays Unwanted wbar
« Reply #9 on: February 11, 2010, 11:16:32 AM »
I have to wonder why there are so many ways to get rid of wbar, when the simplest ones are the bootcode, or using MC where wbar is not included at all.
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: LXDE Displays Unwanted wbar
« Reply #10 on: February 11, 2010, 11:28:22 AM »
I have to wonder why there are so many ways to get rid of wbar, when the simplest ones are the bootcode, or using MC where wbar is not included at all.

Maybe the cleanest way is to build on MC. You are right.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: LXDE Displays Unwanted wbar
« Reply #11 on: February 11, 2010, 11:34:13 AM »
That is the beauty of Tinycore. There are so many ways (each with pros and cons) to do even a simple thing:

1) Use "noicons" boot parameter.
2) Build on microcore base instead of tinycore.
3) Create backup file to remove dot.wbar
4) Create extension to remove dot.wbar
5) Kill wbar in bootlocal.sh
6) Remove wbar startup in ~/.xsession

:)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: LXDE Displays Unwanted wbar
« Reply #12 on: February 11, 2010, 11:35:20 AM »
Quote
Is it possible to boot without using the bootcode "noicons" and unset the variable "ICONS" with a command issued from /opt/bootlocal.sh?
No, because bootlocal.sh is a child script. Any changes to environment variables within it do not affect the init process.
This has helped greatly; it is easy to understand .

In my view the rest of your reply is a model answer.  To provide a range of possible actions in a clear and concise manner is an example for us all.  Many thanks.

Although probably the least elegant solution I will probably adopt the killing of wbar from bootlocal.sh as it represents the closest answer to my requirements.  I have tested it and it fulfills what I requested.  Hopefully your extension will be accepted and I will adopt it at that time.
 

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: LXDE Displays Unwanted wbar
« Reply #13 on: February 11, 2010, 11:38:09 AM »
I have to wonder why there are so many ways to get rid of wbar, when the simplest ones are the bootcode, or using MC where wbar is not included at all.
I am reasonably new to TC and still exploring it.  I have not yet looked at MC.  Is there a guide to building an Openbox/LXDE environment using MC?
 

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: LXDE Displays Unwanted wbar
« Reply #14 on: February 11, 2010, 12:55:21 PM »
I have to wonder why there are so many ways to get rid of wbar, when the simplest ones are the bootcode, or using MC where wbar is not included at all.
I am reasonably new to TC and still exploring it.  I have not yet looked at MC.  Is there a guide to building an Openbox/LXDE environment using MC?
 

http://wiki.tinycorelinux.com/tiki-index.php