Announcement

Collapse
No announcement yet.

Icon-Only Task Manager-"Show A Launcher When Not Running"-Steam?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Icon-Only Task Manager-"Show A Launcher When Not Running"-Steam?

    Hi,

    I am trying to do "Show A Launcher When Not Running" with "Icon-Only Task Manager"
    on Kubuntu 14.04 LTS 64Bit fully updated for WINE running Valve's Steam game client for Windows.

    Here is a screenshot of a link I created on the Desktop:


    I just need help making a permanent icon in my system panel using "Icon-Only Task Manager".

    Thanks in advance!

    Jesse

    #2

    I don't use WINE to run steam games.

    I've installed the native version of Steam for Linux. When I run run Steam an icon appears in the system tray which pops up a menu of options, including running games I've installed. When I am not running steam and can close that Icon. If I run Castle Story or Portal directly from the game menu that system tray icon installs automatically. I can close both it and the game from it.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Originally posted by JeZ-l-Lee View Post
      Hi,

      I am trying to do "Show A Launcher When Not Running" with "Icon-Only Task Manager"
      on Kubuntu 14.04 LTS 64Bit fully updated for WINE running Valve's Steam game client for Windows.

      I just need help making a permanent icon in my system panel using "Icon-Only Task Manager".

      Thanks in advance!

      Jesse
      To be honest, i do not know the purpose of the "show launcher when not running" as compared to a simple application launcher icon. I guess the main difference is that when opening the application, the launcher icon goes away until it is closed.

      So, I take it that when the program is running, right-clicking on the taskbar entry does not offer the option?
      If you don't mind a "normal" icon on the panel, you could simply drag the widget you have created on the desktop to the panel - it will move there pretty easily.

      Comment


        #4
        I am a big WINE user but I also don't use steam. I normally bypass steam altogether.

        While I understand you need to know if the process is already running, so you don't have six or seven running at once. What I don't understand is to have an icon showing it NOT running??

        I would suggest making a bash script and have it display either a menu or change one icon for the process not existing and another when it finds the process. I don't have time to write it all out and test this... so the follow code is only a sketch.

        Code:
        #!/bin/bash
        #Function to run steam
        steam_start() {
              cd "<your path to steam>"
              wine steam.exe
              } 
        #Function to stop steam and possible copies
        steam_stop() {
              killall steam
              } 
        #Function to stop and restart steam 
        steam_restart() {
              steam_stop
              sleep 3
              steam_start
              }
              
        menu_1 () {
              CmdOpt=`kdialog --radiolist "Steam Inactive" 1 "Start steam" on  2 "Reset steam" off`
              case $CmdOpt in
        	1) steam_start
               ;;
        	2) steam_restart
               ;;
        	*) exit
               ;;
              esac
        }
        
        menu_2 () {
              CmdOpt=`kdialog --radiolist "Steam Active" 1 "Kill steam" on  2 "Reset steam" off`
              case $CmdOpt in
            1) steam_stop
               ;;
            2) steam_restart
               ;;
            *) exit
               ;;
        esac
        }
        #The following uses ps and grep to find any mention of steam running then counts them.
        SAct=$(ps -A | grep "steam" | grep -v grep | wc -l)
        case $SAct in 
            0) menu_1
               ;;
            *) menu_2
               ;;
        esac
        I assume this might work. I don't really know for sure.

        Comment


          #5
          Originally posted by Simon View Post
          While I understand you need to know if the process is already running, so you don't have six or seven running at once. What I don't understand is to have an icon showing it NOT running??
          Jez is probably talking about the feature in the task manager to show launchers for specific applications when the application is not running (when the application is running, the launcher icon transforms into the task manager entry)

          The common procedure for this is to start the application and right-click on it's task manager entry and choose "show launcher when application is not running" (as claydoh pointed out)...if that does not work for you JeZ-l-Lee, report back with the results.

          Comment


            #6
            I'm still using 12.04 LTS, so I don't know if this is still applicable in 14.04 LTS.

            Wine apps in general are problematic to get working with IOTM. You can choose "Show a Launcher When Not Running" and it appears to be OK until you exit the Wine app. Then the icon changes to a generic Wine icon and the next time you click on the icon it just does the spinning thing and nothing else happens.

            Have a browse here to see if anything is helpful: https://forum.kde.org/viewtopic.php?f=17&t=106637. Apparently a bug has been filed for this problem too: https://bugs.kde.org/show_bug.cgi?id=317264
            Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
            Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

            Comment


              #7
              Hi,

              I made some progress with the above problem:


              When I click the icon in panel, WINE opens for 2 seconds then closes?

              Thanks!

              Jesse

              Comment


                #8
                Originally posted by Simon View Post
                ... I assume this might work. I don't really know for sure.
                Neat, Simon!

                I haven't kept abreast of Kdialog (or programming) in a while. It seems to me that zombie instances of steam, or hung instances, would mess up the SAct value. Do you see the "case $SAct in ... esac" construct setting up a looping condition that always keeps either menu_1 or menu-2 displayed until their respective "exit" option is selected? How would selecting the "exit" option not fall though to re-execute the $SAct case statement? What would happen if an "exit" variable was created, set initially to false, and having the final $SAct ... esac construct enclosed in an "if $EXIT = false .. do case $SAct .... esac endif", and having menu_1 and menu_2 setting $EXIT=true if their 3rd option were selected?
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Thanks Grey, I tested this with another WINE program (Plants vs Zombies) and it did work as I expected. Though I am glad the OP found an alternate route that used the KDE environment.

                  The script is not supposed to loop. It is meant to simply check on a condition, the presence of the program executable in memory. Then it displays that in 1 of 2 menus, either Active or Inactive. The option to exit a program not running didn't make sense nor starting a program that is already running. If you cancel, the script will exit without starting or stopping a process. Once you choose from the menu it exits. So it does not require an exit since it cannot loop.

                  Now a loop for an persistent icon changer would make more sense. I think you would need it running on the panel at the bottom and using some delay of 4 or 5 seconds would scan the memory and change the icon using the "touch" command for the update.
                  I haven't kept abreast of Kdialog (or programming) in a while.
                  Yes, I am a doctor first, programmer that is what my PC made me. I am also looking now into Zenity and still play with the bash scripting on the weekends. I find it interesting and somewhat relaxing. Zenity seems to offer a lot more with calendars, color selection, forms and more ways to enter and display data.

                  Comment


                    #10
                    I'll have to look into Zenity. Not that I'd do any programming using it, but I am still curious. When I retired in 2008 (after nearlhy 40 yrs programming) I thought I'd program "what I wanted to" but I never got around to it. Too many things to do with the wife, kids and grandkids!

                    EDIT: I looked at Zenity (used to be gdialog). I noticed that both "zenity" and "gdialog" are on my installation. Steam installed copies of both.
                    In Muon both gdialog and zenity are in the zenity package. Gdialog is much small, byte wise, and may just call zenity, which is 10X bigger.

                    Code:
                    $ locate bin/gdialog
                    /home/jerry/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/gdialog
                    /home/jerry/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/bin/gdialog
                    /usr/bin/gdialog
                    jerry@jerry-Aspire-V3-771:~$ locate bin/zenity
                    /home/jerry/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/zenity
                    /home/jerry/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity
                    /usr/bin/zenity
                    Last edited by GreyGeek; Jul 10, 2014, 08:17 PM.
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment

                    Working...
                    X