You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, May 11th 2004, 11:42am

Minimize apps button

How do you do a minimize all (like the "Show Desktop" applet) from the command line (bash) ???

Thanks

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Wednesday, May 12th 2004, 4:56pm

http://www.kde-forum.org/viewtopic.php?t=2326

Cheers,
_
Qt/KDE Developer
Debian User

3

Thursday, May 13th 2004, 12:45am

Legend.. thanks buddy :-D

4

Saturday, November 4th 2006, 10:23pm

Link broken...

Synic

Beginner

Posts: 7

Location: Brisbane - Australia

  • Send private message

5

Saturday, January 6th 2007, 7:00pm

yep - link broken

This link is broken - guess I had actually better look for it.
[SIZE=4]Fedora 7 | 4600X2 | A8N-SLI-Deluxe | 2 x 512 3200XL 2-2-2-5 | XFX 7600GS-500mhz-passive | Avermedia 771 | Samsung 226BW | 3 x WD120JD (no raid) | Logitech Z3-e | SilverStone LC17 | Noctua's[/SIZE]

6

Saturday, January 6th 2007, 11:58pm

You can do it with DCOP:

dcop kicker kicker toggleShowDesktop

shows or hides the desktop.
Help mee om KDE 3.5.5 in het Nederlands te vertalen

Synic

Beginner

Posts: 7

Location: Brisbane - Australia

  • Send private message

7

Sunday, January 7th 2007, 12:16am

bit fuzzy here

sorry for being vague - bit green here.. not too much linux under my belt..

yum tells me:

[root@cpe-60-226-119-17 ~]# dcop kicker kicker toggleShowDesktop
ERROR: Couldn't attach to DCOP server!

ummm... urrr... suggestions?
[SIZE=4]Fedora 7 | 4600X2 | A8N-SLI-Deluxe | 2 x 512 3200XL 2-2-2-5 | XFX 7600GS-500mhz-passive | Avermedia 771 | Samsung 226BW | 3 x WD120JD (no raid) | Logitech Z3-e | SilverStone LC17 | Noctua's[/SIZE]

8

Sunday, January 7th 2007, 12:55am

you shell appears to be in root mode, but are you running KDE as root as well?
Help mee om KDE 3.5.5 in het Nederlands te vertalen

Synic

Beginner

Posts: 7

Location: Brisbane - Australia

  • Send private message

9

Sunday, January 7th 2007, 12:59am

No, not running KDE as root. I just su - everytime I open a terminal. Is this correct or have i gotten into a bacd habbit.?
[SIZE=4]Fedora 7 | 4600X2 | A8N-SLI-Deluxe | 2 x 512 3200XL 2-2-2-5 | XFX 7600GS-500mhz-passive | Avermedia 771 | Samsung 226BW | 3 x WD120JD (no raid) | Logitech Z3-e | SilverStone LC17 | Noctua's[/SIZE]

10

Sunday, January 7th 2007, 1:37am

it's a bad habbit :)

with su - you login as root, using the environment of root.

root did not start kde, so there is no DCOP server running for root.

so the dcop-command won't work.

You can however interfene with a DCOP-server of a user, by giving the correct commands to dcop so that it connects with the DCOP-server of that particular user.

But much easier is to just open a terminal and type the dcop command, without switching to root with su - in the first place.
Help mee om KDE 3.5.5 in het Nederlands te vertalen

11

Sunday, January 7th 2007, 1:52am

Well, since we are scrambling around with su and dcop: here's an example how you can minimize the windows on a kde desktop of a different user then root:

If you want to send a dcop command to a particular user, you have to know the name of the user and the name of the kde session that he/she is running.

You can do that with this command:

# dcop --user username --list-sessions

dcop will reply with something like this:

Active sessions for user /home/username :
.DCOPserver_hostname__0

Then you use that information to minimize all applications on the desktop of 'username' with this command:

dcop --user username --session .DCOPserver_hostname__0 kicker kicker toggleShowDesktop

You can also minimize all applications of all users on all desktops with this command:

dcop --all-users --all-sessions kicker kicker toggleShowDesktop
Help mee om KDE 3.5.5 in het Nederlands te vertalen

This post has been edited 2 times, last edit by "Rinse" (Jan 7th 2007, 1:53am)


Synic

Beginner

Posts: 7

Location: Brisbane - Australia

  • Send private message

12

Sunday, January 7th 2007, 2:02am

hmmm... sounds good

Umm this is good - but I think I am a little out of my depth.

Sounds like I need to figure out how to set all that up as a script, then attach that to a custom applet, and then drop that on the tool bar so I can execute when requried as a "show desktop" icon like WindowZzz... does that sound right?

Yes - :) I am very out of my depth on this one - been using Fedora & KDE for about 3 weeks or so... still figuring out the command prompt.
[SIZE=4]Fedora 7 | 4600X2 | A8N-SLI-Deluxe | 2 x 512 3200XL 2-2-2-5 | XFX 7600GS-500mhz-passive | Avermedia 771 | Samsung 226BW | 3 x WD120JD (no raid) | Logitech Z3-e | SilverStone LC17 | Noctua's[/SIZE]

13

Sunday, January 7th 2007, 2:11am

RE: hmmm... sounds good

Quoted

Originally posted by Synic
Sounds like I need to figure out how to set all that up as a script, then attach that to a custom applet, and then drop that on the tool bar so I can execute when requried as a "show desktop" icon like WindowZzz... does that sound right?

Nope

If you want to have an applet that shows the desktop, just righ click on the panel, and choose [panel menu -> add applet to panel], look for the applet that shows the desktop and add it to the panel.

If you want to create a script that minimizes all windows, then it would look like this:

Source code

1
2
#!/bin/bash
dcop kicker kicker toggleShowDesktop



Quoted

. still figuring out the command prompt.

Well, you can start by not typing su - everytime you open a terminal.
No reason to do everything as root.
Help mee om KDE 3.5.5 in het Nederlands te vertalen

Synic

Beginner

Posts: 7

Location: Brisbane - Australia

  • Send private message

14

Sunday, January 7th 2007, 2:37am

Love your work. I have this problem of not using my common sense... :tongue: Now have a "show desktop" button on my toolbar.

I have been looking so hard at all this stuff that I am not noticing stuff till it popps me in the back of the head...


"Getting use to the command prompt... " well... have my fingers on it, its just the actually commands that fly in one ear and out the other. There are so many I end up not remembering stuff in did a couple of hours ago...
[SIZE=4]Fedora 7 | 4600X2 | A8N-SLI-Deluxe | 2 x 512 3200XL 2-2-2-5 | XFX 7600GS-500mhz-passive | Avermedia 771 | Samsung 226BW | 3 x WD120JD (no raid) | Logitech Z3-e | SilverStone LC17 | Noctua's[/SIZE]