0

From the existing GUI, I want to open a terminal using a QPushButton/QRadioButton. I'm unable to find anything online about using the Xterm inside a GUI. I tried to implement a Urxvt terminal, but I'm facing some problems.

Shriya
  • 27
  • 5
  • Does this answer your question? [How to embed terminal inside PyQt5 application without QProcess?](https://stackoverflow.com/questions/52269950/how-to-embed-terminal-inside-pyqt5-application-without-qprocess) – musicamante Mar 04 '20 at 11:00
  • I have tried to implement this code on PyQt5 and it works. Thank you! Do you know if it's possible to change the default settings of the Urxvt terminal? I want the background to be 'black'. I have tried to change the settings in the Xresources directory, but it doesn't work. Is there any way to modify "self.process.start('urxvt',['-embed', str(int(self.winId()))])" line to set the background color to black? – Shriya Mar 04 '20 at 12:54
  • Have a look at the urxvt command line options. `-bg "#rrggbb"` should work, so you can launch it with `self.process.start('urxvt', ['-embed', str(int(self.winId())), '-bg', '#aa4422'])` – musicamante Mar 04 '20 at 14:02
  • The command line works, thank you for that! But now, the #aa4422 corresponds to an orange color background. Is there a way to specify a black background? – Shriya Mar 05 '20 at 10:41
  • I tried #self.process.start('urxvt',['-embed', str(int(self.winId())), '-bg', 'black', '-fg', 'white'])# and it works perfectly! Thank you for your time and your input! – Shriya Mar 05 '20 at 10:44
  • #aa4422 is just an example color based on the 24bit hexadecimal color definition, which uses 8bit values for red, green and blue components, and it's a standard since at least 20 years... red is #ff0000, green #00ff00, white #ffffff, black #000000, etc. https://en.m.wikipedia.org/wiki/Web_colors#Hex_triplet – musicamante Mar 05 '20 at 11:19
  • Do you have any suggestions on how I can change the cursor settings? I need the cursor to blink and be underlined. – Shriya Mar 05 '20 at 15:06
  • Read the urxvt documentation. – musicamante Mar 05 '20 at 15:10

0 Answers0