You are not logged in.

#1 2017-02-06 03:47:00

vietphi
Member
Registered: 2017-01-27
Posts: 54

[SOLVED] Start chrome .Desktop shortcut with dmenu?

Hi, I'm using i3, dmenu and I want to launch chrome shortcut ".Desktop" in dmenu, is this possible? Can I make it auto launch when booting on specific workspace?

Last edited by vietphi (2017-02-07 05:29:33)

Offline

#2 2017-02-06 05:16:25

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

You can use "i3-dmenu-desktop", included with i3 to launch applications that have desktop entries.
You can autolaunch applications in i3, by specifying in i3/config, and you can specify workspace for any application

exec --no-startup-id chromium
assign [class="chromium"] 2

Offline

#3 2017-02-06 05:53:13

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

You can use "i3-dmenu-desktop", included with i3 to launch applications that have desktop entries.
You can autolaunch applications in i3, by specifying in i3/config, and you can specify workspace for any application

exec --no-startup-id chromium
assign [class="chromium"] 2

This will start chromium instead of specific web app I want.

Offline

#4 2017-02-06 06:12:30

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

that was an example, replace chromium with id of application you want to start

Offline

#5 2017-02-06 06:17:02

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

that was an example, replace chromium with id of application you want to start

How can I find ID of the web apps? it is inside chrome

Offline

#6 2017-02-06 06:32:25

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

AFAIK, chrome webapps can be installed on desktop, as i3 has no desktop, you shall still find webapp in Desktop folder in your home. Have you looked there?

Offline

#7 2017-02-06 07:51:42

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

AFAIK, chrome webapps can be installed on desktop, as i3 has no desktop, you shall still find webapp in Desktop folder in your home. Have you looked there?

I known it but what is the class? it is just a long .Desktop app (chrome-lbfehkoinhhcknnbdgnnmjhiladcgbol-Default.Desktop) and I can't find this in dmenu

Offline

#8 2017-02-06 09:09:27

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

You shall find executable command "Exec=?" in that .Desktop file, (assuming it is regular desktop file), run it and use xprop to find out window class.
Another options is to copy that .Desktop file into /usr/share/applications, that will make this application listed in i3-dmenu-desktop.
EDIT: please post the content of that .Desktop file here

Last edited by Docbroke (2017-02-06 09:15:54)

Offline

#9 2017-02-06 10:24:23

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Evernote Web
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=lbfehkoinhhcknnbdgnnmjhiladcgbol
Icon=chrome-lbfehkoinhhcknnbdgnnmjhiladcgbol-Default
StartupWMClass=crx_lbfehkoinhhcknnbdgnnmjhiladcgbol

The class is "crx_lbfe..."

Offline

#10 2017-02-06 11:18:28

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Is it solved then? Now you have both executable command and wm class

Offline

#11 2017-02-06 11:31:26

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

Is it solved then? Now you have both executable command and wm class

I can finally start it on boot but the xprop class is Google-chrome so it will assign all the chrome windows to the wokspace instead of specific Windows with Apps ID,

Last edited by vietphi (2017-02-06 11:33:19)

Offline

#12 2017-02-06 11:42:30

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

you can add "--class=webapp" flag in your exec=? line, that would start webapp with xprop class of webapp, works with chromium, so it should work with google-chrom hopefully.

Offline

#13 2017-02-06 11:54:42

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

you can add "--class=webapp" flag in your exec=? line, that would start webapp with xprop class of webapp, works with chromium, so it should work with google-chrom hopefully.

Well, the result is both main chrome windows and the webapp start in the Workspace I set

Offline

#14 2017-02-06 12:05:56

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

have you removed Google-chrom class assignment?, as class=webapps is specifically used only for webapps it should not affect main google chrom window

Offline

#15 2017-02-06 12:13:31

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

have you removed Google-chrom class assignment?, as class=webapps is specifically used only for webapps it should not affect main google chrom window

this is my i3 config

exec google-chrome-stable
exec google-chrome-stable --profile-directory=Default --app-id=lbfehkoinhhcknnbdgnnmjhiladcgbol --class=webapp
assign [class="webapp"] $ws3
 

anything wrong?

Offline

#16 2017-02-06 12:18:34

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

My guess here is as you have both webapp and google-chrome main window starting at boot, your worksapce that is focused for webapp is used also used for google-chrome. To avoid that you can try assigning class=Google-chrome to some other workspace.

Offline

#17 2017-02-06 12:27:44

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

Docbroke wrote:

My guess here is as you have both webapp and google-chrome main window starting at boot, your worksapce that is focused for webapp is used also used for google-chrome. To avoid that you can try assigning class=Google-chrome to some other workspace.

it freezes the webapp

 exec google-chrome-stable
assign [class="Google-chrome"] $ws1
exec google-chrome-stable --profile-directory=Default --app-id=lbfehkoinhhcknnbdgnnmjhiladcgbol --class=webapp
assign [class="webapp"] $ws3

Offline

#18 2017-02-06 14:16:16

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,448

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

I tried to start two different instances of chromium with two different window ids, but once you create one instance of chromium all other instances start with the same window-id. It looks like this is not going to work.

Offline

#19 2017-02-07 05:29:08

vietphi
Member
Registered: 2017-01-27
Posts: 54

Re: [SOLVED] Start chrome .Desktop shortcut with dmenu?

This solved the problem:

exec google-chrome-stable
assign [class="Google-chrome" instance="google-chrome"] $ws1

exec google-chrome-stable --profile-directory=Default --app-id=lbfehkoinhhcknnbdgnnmjhiladcgbol
assign [class="Google-chrome" instance="crx_lbfehkoinhhcknnbdgnnmjhiladcgbol"] $ws3 

Offline

Board footer

Powered by FluxBB