Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal Right Click Menu, no copy or split screen #1845

Closed
roizcorp opened this issue Apr 20, 2021 · 21 comments · Fixed by #1899
Closed

Minimal Right Click Menu, no copy or split screen #1845

roizcorp opened this issue Apr 20, 2021 · 21 comments · Fixed by #1899

Comments

@roizcorp
Copy link

I reinstalled my OS, and the Right Click menu never had the additional actions. The weird thing it has used to be on it prior to the OS reninstall, and I do not see any reason why it is missing, the functions do work with keyboard shortcuts e.g. split screen

<details><summary>$ guake --support</summary>

Guake Version:		3.7.0

Vte Version:		0.64.0

Vte Runtime Version:	0.64.0

--------------------------------------------------
GTK+ Version:		3.24.28

GDK Backend:		GdkX11.X11Display

--------------------------------------------------
Desktop Session: gnome

--------------------------------------------------
Display: :0

RGBA visual: True

Composited: True

* Monitor: 0 -  XWAYLAND0
    * Geometry:		1920 x 1080 at 0, 0
    * Size:		280 x 160 mm²
    * Primary:		True
    * Refresh rate:	59.96 Hz
    * Subpixel layout:	unknown
@Davidy22
Copy link
Collaborator

Davidy22 commented Sep 4, 2021

The right click menu is populated from a combination of a custom commands json file and a set of defaults, although it seems like the defaults don't load when the custom commands file is invalid. To fix this, you can create a custom_commands.json file with the contents:

{}

And point "custom command file path" in the general tab of preferences to your custom commands file to get back all your right click menu options. For a more long term solution we should still have the default command options populate when the custom commands file is invalid.

@roizcorp
Copy link
Author

hi,
I fif

The right click menu is populated from a combination of a custom commands json file and a set of defaults, although it seems like the defaults don't load when the custom commands file is invalid. To fix this, you can create a custom_commands.json file with the contents:

{}

And point "custom command file path" in the general tab of preferences to your custom commands file to get back all your right click menu options. For a more long term solution we should still have the default command options populate when the custom commands file is invalid.

I did as you said, it does not work, no split screen nor copy/paste menu items still
many thanks

@Davidy22
Copy link
Collaborator

Davidy22 commented Oct 16, 2021

Attaching a valid custom commands file should work around this for older versions, but there's also a new version of guake out now that should fully resolve this issue. It's not on pypi yet, so for now you'll need to pull from git master to get it.

@roizcorp
Copy link
Author

Can you post it as a reply in a code block, so I could copy and paste it instead?

@Davidy22
Copy link
Collaborator

{} should have been sufficient on older versions so I suspect there was an issue with file paths, but you can also upgrade to the newest guake where this is fully fixed.

@roizcorp
Copy link
Author

local/guake 3.8.0-1
    Drop-down terminal for GNOME

I added the file manually but still nothing,
/home/someuser/.config/guake/custom_commands.json

@Davidy22
Copy link
Collaborator

Going to need more information to figure this out then. What OS did you upgrade to when you began to experience this issue? If you start guake with guake --verbose and right click in the guake terminal, what's the output of the last 50 or so lines?

@Davidy22 Davidy22 reopened this Oct 20, 2021
@roizcorp
Copy link
Author

Hi thanks,
Archlinux + Gnome, I reinstalled my OS from scratch few months back, and since I installed guake the issue happened, before I wiped the machine it worked and I have another work laptop (also Archlinux + Gnome) which works fine
guake --verbose does not produce any output (launched from other terminal)

I did however launched guake --support and got the following

<details><summary>$ guake --support</summary>

Guake Version:		3.8.0

Vte Version:		0.66.0

Vte Runtime Version:	0.66.0

--------------------------------------------------
GTK+ Version:		3.24.30

GDK Backend:		<GdkX11.X11Display

--------------------------------------------------
Desktop Session: gnome

--------------------------------------------------
Display: :0

RGBA visual: True

Composited: True

* Monitor: 0 - XWAYLAND0
    * Geometry:		1920 x 1080 at 0, 0
    * Size:		280 x 160 mm²
    * Primary:		True
    * Refresh rate:	59.962 Hz
    * Subpixel layout:	unknown

@Davidy22
Copy link
Collaborator

guake --verbose produces output if guake is not yet already running, which makes it the place where guake started, if guake has a running session already, guake --verbose just toggles guake open.

@roizcorp
Copy link
Author

thanks here it is
`Logging configuration complete
Guake not running, starting it
Loading Gnome schema from: /usr/share/glib-2.0/schemas
Language previously loaded from: /usr/share/locale
Using system default theme
Patching theme 'Adwaita-dark' (prefer dark = ''yes''), overriding tab 'checked' state': foreground: '#ffffff', background: '#3584e4'
Guake Terminal 3.8.0
VTE 0.66.0
Gtk 3.24.30
created fresh notebook for workspace 0
Spawning new terminal at /home/roi
Spawn command: "/bin/bash"

(guake:2251): VTE-WARNING : 08:50:32.884: (../vte/src/vtepty.cc:667):bool _vte_pty_spawn_sync(VtePty, const char, const char* const*, const char* const*, GSpawnFlags, GSpawnChildSetupFunc, gpointer, GDestroyNotify, GPid*, int, GCancellable*, GError**): runtime check failed: ((spawn_flags & ignored_spawn_flags()) == 0)
current workspace is 0
can't bind show-focus key
set_final_window_rect
height_percents = 100
width_percents = 100
halignment = 0
valignment = 0
hdisplacement = 0
vdisplacement = 0
Current monitor geometry
window_rect.x: 0
window_rect.y: 0
window_rect.height: 1080
window_rect.width: 1920
aligning to center!
MAXIMIZING MAIN WINDOW
set_final_window_rect
height_percents = 100
width_percents = 100
halignment = 0
valignment = 0
hdisplacement = 0
vdisplacement = 0
Current monitor geometry
window_rect.x: 0
window_rect.y: 0
window_rect.height: 1080
window_rect.width: 1920
aligning to center!
MAXIMIZING MAIN WINDOW
Guake initialized
Running main gtk loop
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_MAXIMIZED of type Gdk.WindowState>`

@Davidy22
Copy link
Collaborator

Can you also right click on Guake to make this issue happen, and provide the output created when you right clicked?

@roizcorp
Copy link
Author

roizcorp commented Oct 26, 2021

there you go

MAXIMIZING MAIN WINDOW
order to present and deiconify
Current window position: (root_x=0, root_y=32)
Received window state event: <flags GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_FOCUSED of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_TOP_TILED | GDK_WINDOW_STATE_RIGHT_TILED | GDK_WINDOW_STATE_BOTTOM_TILED | GDK_WINDOW_STATE_LEFT_TILED of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_TOP_TILED | GDK_WINDOW_STATE_RIGHT_TILED | GDK_WINDOW_STATE_BOTTOM_TILED | GDK_WINDOW_STATE_LEFT_TILED of type Gdk.WindowState>
found tag: -1, item: None
Current link under cursor: None
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/guake/boxes.py", line 523, in on_button_press
    menu = mk_terminal_context_menu(
  File "/usr/lib/python3.9/site-packages/guake/menus.py", line 94, in mk_terminal_context_menu
    mi = Gtk.MenuItem(_("Split ―"))
UnicodeDecodeError: 'locale' codec can't decode byte 0xe2 in position 6: decoding error

@Davidy22
Copy link
Collaborator

Davidy22 commented Oct 27, 2021

Alright, I think I see the issue. Will look into writing a fix, shouldn't be too hard but in the meantime, I am curious as to what you get when you open a python interpreter and run:

import locale
print(locale.getlocale())

For reference, my machine gives ('en_US', 'UTF-8'). The fix I plan to attempt will be to set locale.LC_ALL explicitly, because I think it's unset on your machine for some reason. Actually, in addition to the above, what do you get when you do locale.setlocale(locale.LC_ALL, "") in your python interpreter?

@roizcorp
Copy link
Author

roizcorp commented Oct 27, 2021

thanks to you i found that my /etc/locale.conf file was falsely renamed /etc/locale.cong

my locale is en_IL, UTF-8

and your command resulted (None, None)

@roizcorp
Copy link
Author

so ifixed it with your help

many thanks!

@roizcorp
Copy link
Author

I think there is an issue with the split symbol

image

@Davidy22
Copy link
Collaborator

Davidy22 commented Oct 27, 2021

That one's going to be a character encoding issue. The original issue should be fixable too, I'm still probably going to try check locale so that this gets fixed for other people with borked locale files too. Not a perfect solution, the ideal would be help people fix their locale settings so all their programs work, not just guake, but this'll deal with our issues.

Davidy22 added a commit to Davidy22/guake that referenced this issue Nov 1, 2021
Fixes Guake#1845, though does not fix the user's underlying system locale issue that may  impact their experience with other programs on their machine.
@mlouielu
Copy link
Collaborator

mlouielu commented Nov 1, 2021

@roizcorp could you type locale in other terminal apps?

➜  terminator git:(master) locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

As I cannot reproduce your issue in en_IL.UTF-8, I would guess that your locale setting have some problem.

@mlouielu
Copy link
Collaborator

mlouielu commented Nov 1, 2021

I think there is an issue with the split symbol

image

This should be font problem, can you see this in your computer browser: .

@mlouielu
Copy link
Collaborator

mlouielu commented Nov 3, 2021

I would like to know the root cause of this issue, so reopen it.

@mlouielu mlouielu reopened this Nov 3, 2021
@Davidy22
Copy link
Collaborator

Davidy22 commented Nov 3, 2021

For this issue? We've already found it, a locale setting file was named something strange, causing python locale to not recognise a system locale, which is needed for our localisation.

@Davidy22 Davidy22 closed this as completed Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants