Page 1 of 1

[SOLVED]Open the native window manager...

Posted: 09 May 2013, 05:59
by xtudiux
Good pm,

Can someone post their own system-desktop-icon...

Here's Mine but it doest work in xfce

Code: Select all


# Find the desktop we are running and run certain file manager
startx=`ps x | grep -c /usr/bin/startx`
if [ $startx -eq 2 ]; then
    lxde=`ps x | grep -v grep | grep -c /usr/bin/lxsession`
    trinity=`ps x | grep -v grep | grep tdeinit`
    kde4=`ps x | grep -v grep | grep -c /usr/bin/startkde`
    razor=`ps x | grep -v grep | grep -c razor`
else
    lxde=`ps aux | sed '/X '$(echo $DISPLAY|cut -d. -f1)'/,$ !d' | sed '1,/X / !d' | grep -c /usr/bin/lxsession`
    trinity=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep tdeinit`
    kde4=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep -c /usr/bin/startkde`
    razor=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep -c razor`
fi

if [ "$lxde" -eq 1 ]; then
    pcmanfm menu://applications/System || pcmanfm
elif [ "$trinity" ]; then
    konqueror system:/
elif [ "$kde4" -eq 1 -a -z "$trinity" ]; then
    dolphin settings:/
elif [ "$razor" -gt 0 ]; then
    razor-config
else
    echo
fi

There is a corruption on the upper part though

Re: Open the native window manager using when clicking deskt

Posted: 09 May 2013, 06:00
by xtudiux
the script is found on the

Code: Select all

/opt/porteus-scripts/

Re: Open the native window manager using when clicking deskt

Posted: 09 May 2013, 19:19
by Ahau
What command do you want your script to execute when you run it inside Xfce?

It's not running inside Xfce because it doesn't have a section at the top of it that identifies xfce at all when it's the current desktop, and further, it provides no command to execute if xfce is found. If you give me some more information on what you want it to do, I should be able to put it together for you.

Thanks!

Re: Open the native window manager using when clicking deskt

Posted: 10 May 2013, 06:50
by xtudiux
Good pm Ahau,

Its an icon found on my desktop., Its says system.desktop. In the razor-qt, it works there. From what I can say, when it is click, It will ask for execution, once executd, it opens the system menu...

In My xfce, it doesnt because, on the script it doesnt have an info about xfce. on how to handle it. I believe the script is done by brokenman, - I assumed since nearly all scripts in the folder he have a signature there...hehehe

I nearly forgot, thx for the help last time. :D
:)

Re: Open the native window manager using when clicking deskt

Posted: 10 May 2013, 14:25
by Ahau
Ok, I think I understand now. In some desktops, that script will open the settings menu, on others, it opens up a file manager with the icons from the 'system' submenu inside the panel. Assuming you want to open the settings manager for xfce (similar to the behavior in razor), try this script:

Code: Select all

#!/bin/bash
# Author: Brokenman
############################################################
# Open the native window manager using when clicking desktop system icon.


# Find the desktop we are running and run certain file manager
startx=`ps x | grep -c /usr/bin/startx`
if [ $startx -eq 2 ]; then
    lxde=`ps x | grep -v grep | grep -c /usr/bin/lxsession`
    trinity=`ps x | grep -v grep | grep tdeinit`
    kde4=`ps x | grep -v grep | grep -c /usr/bin/startkde`
    xfce=`ps x | grep -v grep | grep -c xfdesktop`
    razor=`ps x | grep -v grep | grep -c azor`
else
    lxde=`ps aux | sed '/X '$(echo $DISPLAY|cut -d. -f1)'/,$ !d' | sed '1,/X / !d' | grep -c /usr/bin/lxsession`
    trinity=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep tdeinit`
    kde4=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep -c /usr/bin/startkde`
    xfce=`ps aux | sed '/ '$(echo $DISPLAY|cut -d. -f1)' /,$ !d' | sed '1,/X / !d' | grep -c xfdesktop`
    razor=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep -c razor`
fi

if [ "$lxde" -eq 1 ]; then
    pcmanfm menu://applications/System || pcmanfm
elif [ "$trinity" ]; then
    konqueror system:/
elif [ "$kde4" -eq 1 -a -z "$trinelif [ "$xfce" -eq 1 ]; then
    thunar $*ity" ]; then
    dolphin settings:/
elif [ "$xfce" -eq 1 ]; then
    xfce4-settings-manager
elif [ "$razor" -gt 0 ]; then
    razor-config
else
    echo
fi
However, you can open this same program through the menu -- just click the Porteus ("Start") button on the panel, hover over "Settings", then click on "Settings Manager".

Thanks!

Re: Open the native window manager using when clicking deskt

Posted: 11 May 2013, 02:54
by xtudiux
Good am ahau,

The scripts opens the system menu on the porteus menu...in the xfce, the system.desktop...doesnt do anything but its there.
The script has a missing entry. I tried the x86-64 one, they have thesame script.

I'll try the script later. Thx Ahau.

Re: Open the native window manager using when clicking deskt

Posted: 11 May 2013, 19:02
by brokenman
Please post output of:

Code: Select all

ps aux | sed '/ '$(echo $DISPLAY|cut -d. -f1)' /,$ !d' | sed '1,/X / !d' | grep -c xfdesktop

Re: Open the native window manager using when clicking deskt

Posted: 14 May 2013, 02:26
by xtudiux
Good am,

Sorry to kep you waiting..Been a long weekend with the election held this monday...

The out of

Code: Select all

ps aux | sed '/ '$(echo $DISPLAY|cut -d. -f1)' /,$ !d' | sed '1,/X / !d' | grep -c xfdesktop
is 1..

Re: Open the native window manager using when clicking deskt

Posted: 14 May 2013, 02:27
by xtudiux
As for the code that was done by Ahau,

I edited it by geany, it works now but it goes to settings not on system...it goes to settings...hmmm...its ok... :D

Re: Open the native window manager using when clicking deskt

Posted: 15 May 2013, 01:22
by brokenman
If the answer is 1 then the next part of the script should fire.

Code: Select all

elif [ "$xfce" -eq 1 ]; then xfce4-settings-manager
This should be the same result as if you open a terminal and type: xfce4-settings-manager

Is this not happening?

Re: Open the native window manager using when clicking deskt

Posted: 15 May 2013, 02:17
by xtudiux
good am,

Its now opening in the xfce4-settings-manager now...
In the razor-qt, it opens on the system menu...

I like it on the xfce4-settings-manager...

chow..

thx for the help...
\

\