Autostart applications help please

Forum Forums General Tips and Tricks Autostart applications help please

  • This topic has 40 replies, 7 voices, and was last updated Oct 25-12:32 pm by ModdIt.
Viewing 15 posts - 1 through 15 (of 41 total)
  • Author
    Posts
  • #33359
    Member
    ModdIt

      To enable easier access for certain users I would like to autostart applications in icewm, but having following problems.
      Using following settings in /home/username/.desktop-session/startup
      claws-mail –geometry 941×1173+0+0 &
      palemoon –geometry 974x1177x945x0 &
      Both autostart stacked over each other on left of screen desktop 0.

      After trying all the suggestions I was able to find in the net, probably not understanding some of them correctly
      I am now hoping that a more experienced IceWM user can please explain in simple terms.

      How to set autostarted windows next to each other or set opening position on desktop.
      How to start an application to a specific desktop specifying window size and position or full screen.
      Following a suggestion on another forum I also tried putting following in /home/username/.icewm/winoptions without any effect.
      claws-mail.workspace: 0
      libreoffice –writer.workspace: 1
      libreoffice –calc.workspace: 1

      Thankful for any forthcoming help
      Moddit

      #33360
      Forum Admin
      anticapitalista
        Helpful
        Up
        0
        ::

        Where did you find that info?

        Maybe you need to add it to /home/username/.icewm/startup since it is specific to IceWM and not any other window manager?

        Philosophers have interpreted the world in many ways; the point is to change it.

        antiX with runit - leaner and meaner.

        #33361
        Anonymous
          Helpful
          Up
          0
          ::

          First, requesting geometry within the startup file is not supported, per the docs.

          Second, “libreoffice –writer” and “libreoffice –calc” are command strings (not window classnames).
          iceWM probably will be unable match to either of those strings when scanning WINDOW_ID and WM_CLASS

          https://ice-wm.org/FAQ/
          .

          man icesh
          man xdotool
          After determining what the WM_CLASS is for a “writer” window and/or a “calc” window, you will need to separately
          place startup file lines to launch (autostart) instances of “libreoffice –writer” and “libreoffice –calc”
          followed by (probably) a line instructing a sleep command (delay until instances of those windows have instantiated)
          followed by a series of icesh commands, or xdotool commands, instructing the placement and geometry of the targeted windows

          #33389
          Moderator
          BobC
            Helpful
            Up
            0
            ::

            Go to control centre, desktop, icewm options, then go to the winoptions tab and add a line

            claws-mail.geometry: 700×600+250+0

            You need to restart icewm after you save the winoptions file, then open claws mail

            PS: here is a link
            https://unix.stackexchange.com/questions/324041/xfce-and-icewm-window-manager-configuration-file-doesnt-work

            • This reply was modified 3 years, 2 months ago by BobC.
            • This reply was modified 3 years, 2 months ago by BobC.
            #33394
            Member
            ModdIt
              Helpful
              Up
              0
              ::

              Thanks to all for hints and suggestions, I had been reading a lot before I asked for help.
              Autostarting applications as well as shutting down the system at a particular time is working fine,
              I did need sleep 1 for Libreoffice.
              Not yet solved is getting programms to open on desktops other than default.
              @ BobC I have had any any single programm starting in the required geometry since before I posted
              windows open only on left of screen.
              A following programm stacks on top of the first even with position offset. Maybe something in settings or
              theme causing that. Place windows next to each other from autostart on a big screen not yet solved.

              ICEWM is to me anyway not so easy to understand, Including Ice Shell a huge options and commands list
              makes it extremely powerful but somewhat complex.
              Probably I will kick myself for some silly oversight once things work as intended..

              #33395
              Forum Admin
              Dave
                Helpful
                Up
                0
                ::

                Is fluxbox too complicated for use?
                I am fairly certain you can achieve the remembering of position and dimensions via the apps file (as well as right clicking the toolbar tab). I am not certain if you can place the window on another workspace natively or not though. It is definitely possible via another program (wmctl?.?).

                Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

                #33396
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  This is a thread on using wmctrl to control window attributes. You could start the apps via startup, then sleep a little to give them time to come up, and then adjust them with wmctrl.

                  http://www.murga-linux.com/puppy/viewtopic.php?t=111415&sid=0aadf9cc1b8961a5250bfb293c0e05a7

                  #33398
                  Member
                  ModdIt
                    Helpful
                    Up
                    0
                    ::

                    Thanks to all once more.
                    getting nearer now. Settings as below autostart and populate desktops. Libreoffice for some reason will only start on 0. Maybe I can figure out why later, anyway I can quickly move through desktops.
                    Have to get some other things done now, will report on progress next days. I st 4 desktops in preferences, ice can cope with 12 active desktops, at present on this desktop I have claws, quietened firefox 73 and two rox windows open, other desktops populated with LO Writer and Calc plus Palemoon, Ram is at 704M while writing this I have 2 Gig so quite comfortable.

                    Icewm Startup has following entrys
                    #!/bin/bash
                    claws-mail &
                    palemoon &
                    sleep 1
                    libreoffice –writer &
                    sleep 1
                    libreoffice –calc &

                    Icewm/winoptions entrys as follows
                    Claws-mail.geometry: 941×1173+0+0
                    Claws-mail.workspace: 2
                    Pale moon.geometry: 941×1173+0+0
                    Pale moon.workspace: 1
                    wait 1
                    libreoffice-writer.geometry: 941×1173+0+0
                    libreoffice-writer.Workspace: 0
                    wait 1
                    libreoffice-calc.geometry: 941×1173+0+0
                    libreoffice-calc.Workspace: 0

                    I tested setting windows next to each other, dimensions respected in LO Calc and Writer on desktop 0.
                    will check on other desktops in a day or so. **Just checked works too.

                    If anyone knows why LO will only autostart on desktop 0 it might be useful to know.
                    Alt tab is a LO shortcut so will use Alt 1 to 4 as are assigned shortcuts to move between desktops.
                    According to preferences 12 Desktops are possible, should be enough :-).

                    @BobC thanks for the link which was key to get things moving.
                    @Dave, thanks for suggestion, just find myself very comfortable with IceWM, looking at the options and
                    the way this setup replaces even big window managers without users even realising or missing anthing
                    except fancy effects I see no reason to move anytime soon.

                    • This reply was modified 3 years, 2 months ago by ModdIt.
                    • This reply was modified 3 years, 2 months ago by ModdIt. Reason: clarity and corrections
                    #33420
                    Moderator
                    BobC
                      Helpful
                      Up
                      0
                      ::

                      I think I understand, now.

                      You want all the apps to open as soon as you boot the machine and login, but when they open, they all open on top of each other.

                      Is that the problem?

                      I created a startup to solve that. Replace firefox-esr with palemoon.

                      #!/bin/bash
                      firefox-esr &
                      sleep 5
                      claws-mail &
                      sleep 5
                      libreoffice --writer &
                      sleep 5
                      libreoffice --calc &
                      sleep 5
                      roxterm &
                      

                      To explain, firefox opens full screen. It has work to do anyway. The 5 second waits between apps allow each app to open, then when the next app opens, the space is already taken, so it opens the next app someplace else on the screen. Now they will open in a cascaded manner, just like if you had opened them one at a time. You might not need the winoptions entries if this works.

                      I’m sorry I didn’t understand the problem initially.

                      • This reply was modified 3 years, 2 months ago by BobC.
                      • This reply was modified 3 years, 2 months ago by BobC.
                      • This reply was modified 3 years, 2 months ago by BobC.
                      #33425
                      Moderator
                      BobC
                        Helpful
                        Up
                        0
                        ::

                        Ok, now, libroffice doesn’t want to open on a different workspace, so I use wmctrl to switch to the 2nd workspace, open libreoffice, then come back to the 1st workspace. In the meantime on my test system I installed palemoon to make sure that would work, too. You can adjust the sleep settings lower, but on slower machines this might cause trouble.

                        #!/bin/bash
                        wmctrl -s 0 #Switches to workspace 0=1st workspace
                        palemoon &
                        sleep 5
                        claws-mail &
                        sleep 5
                        wmctrl -s 1 #Switches to workspace 1=2nd workspace
                        libreoffice --writer &
                        sleep 5
                        libreoffice --calc &
                        sleep 5
                        wmctrl -s 0 #Switches to workspace 0
                        roxterm &
                        

                        This idea came from a website
                        https://askubuntu.com/questions/206624/how-do-i-script-to-open-a-set-of-programs-each-on-specific-workspace

                        • This reply was modified 3 years, 2 months ago by BobC.
                        #33427
                        Member
                        ModdIt
                          Helpful
                          Up
                          0
                          ::

                          @BobC wmctrl: Thanks that seems to be the last step needed. Up to now everything was as planned except for LO insisting on opening on initial desktop. E mail check is first step after login, assignments come that way so want claws on opening desktop.
                          The idea is to populate desktops with a set of applications on login, I have some hopes that a cash strapped school can be persuaded to keep old thinkpads running by showing how easy a minimal linux system can work for the admin and users.

                          #33429
                          Moderator
                          BobC
                            Helpful
                            Up
                            0
                            ::

                            Glad to hear that solves it. I assume you know how to add more workspaces.

                            You might consider opening claws-mail last on the desktop so that it is on top as a result.

                            Are you using IceWM’s mail notifier tray icon? Its built in, but I’ve never used it myself.

                            #33432
                            Member
                            ModdIt
                              Helpful
                              Up
                              0
                              ::

                              Thanks once more.
                              My startup looks like this now, applications starting with correct window placement
                              on desktops. Nice.
                              LO must be closed before logout or shutdown otherwise next start is clunky
                              due document recovery function chipping in. I think that can be fixed though.

                              Less use of wmctrl made system work ready far faster.

                              I am running a reasonably fast SSD, rest about 9 years old.
                              The longer waits suggested will be neccesary on slower machines,
                              or I guess using hdd. I only use those as data drive these days.

                              #!/bin/bash
                              claws-mail &
                              palemoon &
                              wmctrl -s 2 #Switches to workspace 2=3rd workspace
                              libreoffice –writer &
                              sleep 2
                              libreoffice –calc &
                              sleep 2
                              wmctrl -s 0 #Switches to workspace 0

                              Icewm winoptions as below, taking the waits out borked the loading so will keep like this for now.

                              Claws-mail.geometry: 941×1173+0+0
                              Claws-mail.workspace: 0
                              Pale moon.geometry: 941×1173+0+0
                              Pale moon.workspace: 1
                              wait 1
                              libreoffice-writer.geometry: 904×1186+0+0
                              libreoffice-writer.Workspace: 2
                              wait 1
                              libreoffice-calc.geometry: 1003×1180+900+0
                              libreoffice-calc.Workspace: 2

                              #33433
                              Member
                              ModdIt
                                Helpful
                                Up
                                0
                                ::

                                BobC wrote: I assume you know how to add more workspaces. Yup, easy part.

                                The settings are in icewm/preferences. Easiest way to find them is open file with
                                geany then use search. Depending on how you have your setup there are a lot of preferences to dig through.
                                The settings can be overridden by themes so if changes are not working a change of theme might help.
                                You might finally need to add an icewm-prefoverride – icewm override preferences configuration file if
                                change of theme is innefective.

                                /home/yourusername/.icewm/themes/Simplest_black-Small is what I have right now, nice because titlebars
                                are small so no waste of screenspace. Put theme in home so it survives updates.

                                WorkspaceNames=” 1 “, ” 2 “, ” 3 “, ” 4 ”
                                # Limit number of taskbar workspaces
                                # TaskBarWorkspacesLimit=””
                                Ice can use 12 workspaces, not tried to see if the theme auto adapts to that.

                                You might consider opening claws-mail last on the desktop so that it is on top as a result.

                                I have it on window 0 on its own at present so no problem there. I think ice has a start parameter to open on top
                                should things change.

                                Are you using IceWM’s mail notifier tray icon? Its built in, but I’ve never used it myself.

                                Have seen the feature but I auto hide the taskbar and do not want bing sound when the spam gets notified so not using either.

                                #33434
                                Member
                                ModdIt
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Last problem

                                  LO must be closed correctly before logout or shutdown otherwise next start is clunky
                                  due document recovery function chipping in.

                                  Start LO with parameter –norestore like this “libreoffice –norestore –writer” “libreoffice –norestore –calc” fixes that problem. I have set autosave to 4 minutes so not likely much could get lost by accident.

                                  • This reply was modified 3 years, 2 months ago by ModdIt.
                                Viewing 15 posts - 1 through 15 (of 41 total)
                                • You must be logged in to reply to this topic.