Below copies of post from a thread I have on the Manjaro forums. Any help finding a solution would be appreciated.
Quote:
I've noticed that sometime when I click a app to launch it I get taken to it's assigned desktop. I like this behavior and would like to know how to make it universal. Myself I'm use to just clicking on the particular virtual desktop in Pager, but my friend still gets a bit confused on what to do when a app opens on a different desktop than one he's on. For him auto-switching would be much easier cause he's still so new to Linux. Thanks
|
Quote:
Example:
kstart5 --desktop 4 /usr/bin/vivaldi-stable
Either edit the desktop file in /usr/share/applications or write a script file.
|
Quote:
That's simple enough. Not the script still don't really know that much about creating my own scripts. Thanks[/CODE]
[CODE]What applications are you wanting to run? I have a really good script that may help you.
|
Code:
#!/bin/bash
#notify-send "Starting/Switching to Browser"
######################################################################################################
# This script will toggle minimize/activate first window with specified class
# If window not found program will be launched
#
# window class can be found with next programs:
# wmctrl -x -l
# xprop
# No credit taken.......... Cannot read the original.....
# Found on http://blog.sokolov.me/2014/06/20/linuxx11-toggle-window-minimizemaximize/
# in Russian :) but works when adjusting the wrapping.
# Assigned to meta-f in KDE plasma 5
######################################################################################################
NEEDED_WINDOW_CLASS="Navigator.firefox"
LAUNCH_PROGRAM="kstart5 --desktop 4 /usr/bin/firefox"
######################################################################################################
NEEDED_WINDOW_WINDOW_ID_HEX=`wmctrl -x -l | grep "${NEEDED_WINDOW_CLASS}" | awk '{print $1}' | head -n 1`
NEEDED_WINDOW_WINDOW_ID_DEC=$((${NEEDED_WINDOW_WINDOW_ID_HEX}))
if [ -z "${NEEDED_WINDOW_WINDOW_ID_HEX}" ]; then
${LAUNCH_PROGRAM}&
else
echo "Found window ID:${NEEDED_WINDOW_WINDOW_ID_DEC}(0x${NEEDED_WINDOW_WINDOW_ID_HEX})"
ACIVE_WINDOW_DEC=`xdotool getactivewindow`
if [ "${ACIVE_WINDOW_DEC}" == "${NEEDED_WINDOW_WINDOW_ID_DEC}" ]; then
xdotool windowminimize ${NEEDED_WINDOW_WINDOW_ID_DEC}
else
xdotool windowactivate ${NEEDED_WINDOW_WINDOW_ID_DEC}
fi
fi
Quote:
Assign to a hot key. It launches firefox on first press, subsequent presses raise or lower firefox.
Needs xdotool & wmctrl installed.
|
Quote:
kstart5 --desktop 4 /usr/bin/vivaldi-stable
I'm going to be better off with that I think. Got it to work with Vivaldi but not Chrome.
|
Quote:
What did you try for chrome??
Think it is called google-chrome-stable.....
|
Quote:
start panel, search google, rightclick edit application, click application tab, and kstart5 --desktop 2 /usr/bin/google-chrome-stable %U under command.
|
Quote:
Let me test.
From a terminal:
kstart5 --desktop 4 /usr/bin/google-chrome-stable
works. Also works if I do what you did - check for a space missing.
|
Code:
[agentx@Secret-Computer ~]$ kstart5 --desktop 4 /usr/bin/google-chrome-stab
le
Omitting both --window and --windowclass arguments is not recommended
Icon theme "HiColor" not found.
Icon theme "Gnome" not found.
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/8x8/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/16x16/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/1
6x16/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/22x22/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/24x24/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/2
4x24/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/32x32/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/3
2x32/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/48x48/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/4
8x48/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/256x256/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/512x512/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwai
ta/scalable/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/s
calable/ui/"
[agentx@Secret-Computer ~]$ [1:1:0129/134334.822197:ERROR:chrome_content_cl
ient.cc(322)] Failed to locate and load the component updated flash plu
gin.
[5145:5145:0129/134335.004685:ERROR:chrome_content_client.cc(322)] Fail
ed to locate and load the component updated flash plugin.
[5145:5182:0129/134335.044566:ERROR:token_service_table.cc(140)] Failed
to decrypt token for service AccountId-102006715617681275257
[5145:5145:0129/134335.978620:ERROR:account_tracker.cc(241)] AccessToke
nFetched error: Invalid credentials (credentials missing).
[5210:1:0129/134337.581805:ERROR:child_process_sandbox_support_impl_lin
ux.cc(79)] FontService unique font name matching request did not receiv
e a response.
[5210:1:0129/134337.582606:ERROR:child_process_sandbox_support_impl_lin
ux.cc(79)] FontService unique font name matching request did not receiv
e a response.
[5210:1:0129/134337.584911:ERROR:child_process_sandbox_support_impl_lin
ux.cc(79)] FontService unique font name matching request did not receiv
e a response.
[5210:1:0129/134337.585792:ERROR:child_process_sandbox_support_impl_lin
ux.cc(79)] FontService unique font name matching request did not receiv
e a response.
Quote:
Weird, you can ignore the theme/icon/font stuff, I get:
|
Code:
21:45:38 ➜ ~ took 28s ➜ kstart5 --desktop 4 /usr/bin/google-chrome-stable
Omitting both --window and --windowclass arguments is not recommended
Icon theme "Yaru" not found.
21:48:20 ➜ ~ ➜ [1:1:0129/214820.187466:ERROR:chrome_content_client.cc(322)] Failed to locate and load the component updated flash plugin.
[21313:21313:0129/214820.383503:ERROR:chrome_content_client.cc(322)] Failed to locate and load the component updated flash plugin.
[21505:21505:0129/214820.512134:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[21532:1:0129/214821.385944:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[21532:1:0129/214821.387853:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.