LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-20-2018, 01:29 PM   #1
ziplark
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Rep: Reputation: 0
How to set _OB_APP_TYPE to desktop in python3 and qt5


I'm looking to keep a python3 program running up on the desktop after I hit super+d. Basically trying to keep a webpage up as my background using openbox.

I know I can use devilspie as an after the fact setup to change _OB_APP_TYPE to desktop using...

devilspie snippet
Code:
(if
(matches (application_name) "mypythonscript.py")
(begin
(wintype "desktop")
)
)
but since I'm using a custom program I'd like to also have it set this type on its own without devilspie if possible. I've looked around and have tried different search terms with no avail.

mypythonscript.py
Code:
#!/usr/bin/env python3

import sys
import signal

from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl
from PyQt5.QtWebKitWidgets import QWebView

if __name__ == "__main__":
    app = QApplication(sys.argv)

    #allow ctrl+c
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    #init browser
    browser = QWebView()
    browser.load(QUrl("https://www.google.com/"))

    #show browser
    browser.show()
    
    #close when window closes
    sys.exit(app.exec_())
openbox config snippet
Code:
    <application class="mypythonscript.py">
      <decor>no</decor>
      <position force="yes">
	<monitor>2</monitor>
      </position>
      <maximized>yes</maximized>
      <layer>below</layer>
      <desktop>all</desktop>
      <skip_taskbar>yes</skip_taskbar>
      <skip_pager>yes</skip_pager>
    </application>
any help on this or what I should be reading, or even proper names of things if I'm using improper ones to search for would be awesome.
 
Old 01-21-2018, 01:20 PM   #2
ziplark
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Original Poster
Rep: Reputation: 0
... how did my thread move to Non unix? I'm confused I know I didn't put it there. This is on Debian using Openbox I'm trying to set _OB_APP_TYPE reported from obxprop / xprop
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to start python3.6 interpreter just by typing python in terminal not python3.6 bmohanraj91 Linux - Newbie 4 05-10-2017 07:51 AM
After upgrade python3.4 to python3.5.1 , not able to install packages "request" though pip3 YOGESHAS87 Linux - Software 1 08-03-2016 10:38 PM
[SOLVED] PyQt for Python3? rshepard Slackware 13 08-03-2016 10:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration