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
Closed
sanderjo opened this issue
Oct 26, 2018
· 5 comments
Comments
Ubuntu 18.04.
After installing unetbootin from PPA (repository ppa:gezakovacs/ppa
), running unetbootin (as root) gives the error messages below, plus a grey window.
Tips how to solve this?
$ sudo unetbootin
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x146
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x380000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3800010
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3800010
Ah, found workaround #66
sudo QT_X11_NO_MITSHM=1 unetbootin
which works on Ubuntu 18.04.
But … pity it is still a problem.
krakatoa, TryTryAgain, cubical8569, patrizz, temp1029, and MisterDaniels reacted with heart emoji
sanderjo
changed the title
PPA version: X Error: BadAccess (attempt to access private resource denied) 10
Ubuntu 18.04 & PPA version: X Error: BadAccess (attempt to access private resource denied) 10
Oct 26, 2018
This workaround works in 18.04.3 kernel 5 when installing Natron installer using sudo.
This works for Fedora 32 as well.
# unetbootin-677-1.fc32.x86_6
sudo dnf install unetbootin
sudo QT_X11_NO_MITSHM=1 unetbootin
sudo nano /etc/environment
and then add QT_X11_NO_MITSHM=1
works for me under ubuntu 18.04.5 LTS.
Thanks!
Solution still works on Ubuntu 20.04.2 LTS. Worked for me after a fresh install of Ampps. Once again thanks
I’m trying to create an app that is all hotkey based, I wrote some code using Xlib that works great on CentOS 6.. When I tried in our Ubuntu (14.04) development environment I get this exception
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 33 (X_GrabKey)
Serial number of failed request: 10
Current serial number in output stream: 13
Here is the code
void* manage_hotkeys(void* arg)
{
Window root;
XEvent ev;
Display* dpy = XOpenDisplay(0);
char* ckeystr = "c";
...
if (!dpy)
{
printf("Failed to get Displayn");
exit(EXIT_FAILURE);
}
root = DefaultRootWindow(dpy);
KeyCode ckey = XKeysymToKeycode(dpy, XStringToKeysym(ckeystr)); // control panel
// grab keys
XGrabKey(dpy, ckey, AnyModifier, root, True, GrabModeAsync, GrabModeAsync);
....
while (1)
{
printf("Beginning of hotkey loopn");
XNextEvent(dpy, &ev);
if (ev.type == KeyPress)
{
printf("Key press event!n");
if (ev.xkey.keycode == ckey)
{
// stuff...
} else if .....
} // if
} // while
...
XUngrabKey(dpy, ckey, AnyModifier, root);
...
pthread_exit(NULL);
} // hotkeythread
I’ve looked at other SO threads (like this one) but they don’t seem applicable to me, I’m listening for single keys (e.g. ‘c’). I don’t code much in C so I’m a bit rusty and went with the first example that worked (on CentOS at least), please help me debug.
From what I’ve researched, I think some process in Ubuntu has already grabbed the keys or something? How do I figure out what that process is? Is there another approach I’m overlooking? I just need to to grab keyboard input regardless of the window in focus, xgrabkey looked like the simplest approach… Please help
R00KIE wrote:
I’m not sure but I think X forwarding wasn’t meant to forward the whole desktop environment …. or the other way around …. desktop environments are not made to be completely forwarded through X.
If you want such a thing consider using x11vnc or something similar.
It might not have been intended, or particularly useful but you certainly can do it, I’ve ssh’d to the maths dept computers at college and started kde from the terminal. I only did it for fun a few times, but thankfully their servers can handle the load, and the intranet is quite fast so I had no problems. I generally only get mathematica, konqueror, or firefox forwarded to my laptop.
As Rookie said, vnc might be a better option for you. Personally I have vnc on all my experimental* pcs so I can check/control them from home, and if you want to you can still use ssh forwarding to have a more secure connection than just using vnc on its own. It also means you can view/run your apps from any non *nix OS. We have it running on one of our old amigas that still controls one setup, always amusing to vnc to!
For reference, here is the command I call when I login to my maths account:
sudo ssh -Y -L 5901:server.dns:5901 username@server.dns
This forwards the local port (-L) 5901 to 5901 on the server (useful for tunneling through the proxy).
I already have a vnc server running on the server, so once I have ssh’d in, in my local terminal I call
This will then tunnel throught the ssh connection and will connect to the vnc server on my maths account. You might have noticed the -Y switch, that is for secure X11 forwarding, there is another one -X which is unsecure, you can check it in the ssh man pages. With the -Y switch I can call apps such as mathematica from the maths dept and have it forwarded to my local X11.
One other thing that you might find useful is SSHFS: http://wiki.archlinux.org/index.php/Sshfs
I use this to mount remote folders such as my data folders in experimental pcs, my main lab pc, and my maths accounts. I find it much more convenient to use than samba.
* As in pcs controlling experimental setups and measurements, not pcs that are tests/prototypes
====* — Joke
O
|/ — Me
/ Whooooosh
Содержание
- Не могу запускать приложения от sudo через xrdp
- Спасибо, но.
- Ничего не понимаю!!
- GUI ERROR: X Error: BadAccess (attempt to access private resource denied) 10 #9
- Comments
- BadAccess, BadShmSeg #60
- Comments
Не могу запускать приложения от sudo через xrdp
При подключении к домашнему компьютеру с kubuntu 13.10 через rdp (xrdp) пытаюсь о рута запустить приложение открывается серая рамка вместо окна Скриншот
в самой консоли выдает
Как эту проблему победить? Раньше такое было только при подключении через x11rdp сессию, сейчас и при vnc-session такое же. При этом локально от этого же пользователя все нормально запускается. Единственная нормально запускающаяся программа таким образом это xretm вот он грузится как положено, а вместо всего остального — как на скрине. Если залогиниться к xrdp от рута то все тоже работает.
Подозреваю, что-то недоделано с Xauthority или выбором X сервера (переменная DISPLAY), хотя работающий xterm (если я правильно перевёл) намекает, что кривизна в приложении, а не в системе.
попробуй через kdesudo
Прошу прощения забыл указать, что уже пробовал и kdesudo, и gksudo. Результат тот же. Вывод по дебагам по этим командам прилагаю.
Дебаг x11rdp-session
Дебаг тех же команд в vnc-session
если не поможет попробуй
А можно по подробнее?
man не очень помог.
Вот что у меня выдают xhost и xauth локально
А вот что при подключении через xrdp
в общем так: xhost + разрешает подключаться всем хостам, выполняется на машине где запущены иксы (ssh client). Далее после ssh user@server -XY, в дело вступает xauth. Чтобы из под sudo окошки могли подключаться к твоему X серверу, нужно пробросить куки. Их список можно вывести командой xauth list. Задача состит в том чтобы добавить их в рутовский .Xauthority. В итоге должны выполнить что-то вроде:
поначалу может ругнуться на отсутствие .Xauthority у рута, достаточно создать пустой файл
ничего не понял. Причем тут ssh? Я его не использую нигде. Подключаюсь к серверу по rdp. Запускаю konsole и от туда уже через sudo запускаю необходимые программы.
По поводу приведенного примера с кодом, не понял что и где надо выполнять.
видимо меня смутило, что ты пытался всё через sudo запустить, ну да ладно. после kdesudo konsole в /tmp появляются файлы kdesudo-*-xauth? там как раз должны храниться куки. а что показывает kdesudo xauth list ?
в /tmp появляются файлы kdesudo-*-xauth?
а что показывает kdesudo xauth list?
Идеи кончились?
Кто в теме помогите пожалуйста!!
Попробуй отключить selinux
предлагаю заменить xrdp на nx или x2go
а это как раз вряд ли изменит ситуацию
Не знаю, что такое xrdp и зачем нужно, но очевидно следует разобраться с xauth.
Спасибо за участие, но хотелось бы более конкретные предложения/решения.
Спасибо, но.
Спасибо за совет, но если я правильно понял, x2go требует собственный клиент по windows. Это не подходит. Нужен доступ через RDP.
С последним обновлением самостоятельно пофиксился баг в vnc-session. Проблема осталась только в x11rdp-session.
Ложная тревога. Все как не работало так и не работает. 🙁
А чем вас ssh не устраивает, тем более konsole запускаете.
как раз таки это изменит ситуацию, в отличие от плясок вокруг неподдерживаемого набора костылей.
А чем вас ssh не устраивает, тем более konsole запускаете.
Не устраивает тем, что я удаленно запускаю графические приложения. И запускать их нужно от рута. Konsole я для примера запустил.
Вопрос по поводу x2go открыт — он требует установки клиентского ПО на компьютере откуда будет осуществляться подключение? Если да — то это не подходит, не всегда есть возможность установить доп ПО, а доступ иногда бывает из неожиданных мест.
Пробовал удалять
/.Xauthority ничего не изменилось.
Очевидно, что проблема с достатком прав где-то, но где и как это пофиксить мне не понятно.
Повторюсь: посмотрите на поведение при отключенном selinux
Не уверен что он у меня включен
В папке /etc/selinux/ нет файла config
В корне нет папки selinux — отключить его через /selinux/enforce тоже не могу
Ничего не понимаю!!
Товарищи обнаружилась непонятная особенность. Дома есть ноут с Win7 HB, так вот при подключении с этого ноута sudo под vnc-session работает. При этом даже с самого «сервера» при подключении к саму же себе (127.0.0.1) sudo не работает, и при подключении с другого компьютера sudo не работает.
У кого какие соображения, почему так происходит? Как различные ОС могут влиять на привелегии запуска в удаленном терминале?
Для информации, ноутбук на котором sudo работает находится в одной локальной сети с сервером. Но если дело в сети, то почему не работает при подключении сервера к самому себе через 127.0.0.1??
Вывод дебага при запуске sudo с ноута
Источник
GUI ERROR: X Error: BadAccess (attempt to access private resource denied) 10 #9
hello,everyone,
I run LimeSDR with srsLTE. When i set gui to be true in enb.conf or ue.conf, there are lots of errors with the GUI feature. Does anyone know whats wrong? How to solve it?
Any help will be appreciated. Thanks so much.
/srsLTE/srsenb$ sudo srsenb enb.conf
Built in Release mode using commit c2de0c67 on branch master.
— Software Radio Systems LTE eNodeB —
Reading configuration file enb.conf.
Opening 1 RF devices with 1 RF channels.
linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown
Soapy has found device #0: addr=1d50:6108, driver=lime, label=LimeSDR-USB [USB 3.0] 9081C05C13524, media=USB 3.0, module=FX3, name=LimeSDR-USB, serial=0009081C05C13524,
[INFO] Make connection: ‘LimeSDR-USB [USB 3.0] 9081C05C13524’
[INFO] Reference clock 30.72 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz
[INFO] LMS7002M register cache: Disabled
Setting up Rx stream with 1 channel(s)
Setting up Tx stream with 1 channel(s)
[INFO] RX LPF configured
[INFO] RX LPF configured
Set Rx bandwidth to 2.50 MHz
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 5 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 5.00 MHz
Available device sensors:
- clock_locked
- lms7_temp
Available sensors for Rx channel 0: - lo_locked
[INFO] Tx calibration finished
[INFO] Rx calibration finished
State of gain elements for Rx channel 0 (AGC not supported): - TIA: 9.00 dB
- LNA: 30.00 dB
- PGA: -4.00 dB
State of gain elements for Tx channel 0 (AGC not supported): - PAD: 45.00 dB
- IAMP: 0.00 dB
Rx antenna set to LNAL
Tx antenna set to BAND1
Warning burst preamble is not calibrated for device lime. Set a value manually
Setting frequency: DL=2685.0 Mhz, UL=2565.0 MHz
Setting Sampling frequency 11.52 MHz
Failed to connect to MME — retrying in 10 seconds
==== eNodeB started ===
Type to view trace
Starting plot for worker_id=0
[INFO] RX LPF configured
Set Rx bandwidth to 8.64 MHz
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x4c00012
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x4c0001f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
[INFO] Filter calibrated. Filter order-4th, filter bandwidth set to 8.64 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
[INFO] TX LPF configured
Set Tx bandwidth to 8.64 MHz
[INFO] Tx calibration finished
[INFO] Rx calibration finished
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x4c00020
The text was updated successfully, but these errors were encountered:
Источник
BadAccess, BadShmSeg #60
Please describe the issue in as much detail as possible, including any errors and traces
I get this when i run the test command
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x2e00003
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x2e0000d
Linux distribution (if applicable): Ubuntu 18.04.1
Howdy version:
The text was updated successfully, but these errors were encountered:
Could you try running it as sudo QT_X11_NO_MITSHM=1 howdy test ?
To apply this fix permenatly add QT_X11_NO_MITSHM=1 to the bottom of /etc/environment .
Hi there, thanks for putting this together!
I had the same issue upon trying to run sudo howdy test and the viewer window was blank.
I tried running sudo QT_X11_NO_MITSHM=1 howdy test and it worked, though the image it returned was basically blank (see attached) and not dynamic (the image didn’t really change even as I moved my face closer to the camera/emitters or waved my hand in front of them).
When I try using howdy normally it just times out and I have to enter the password. I assume it’s because the image is not actually dynamic (i.e. not even recognizing something that resembles a face).
I’m running Ubuntu 18.04 LTS on a Thinkpad T480s.
This is a known decoding error in some cameras, could you try running sudo howdy config and setting force_mjpeg to true?
OK, did that and the test procedure gives an actual image — great!
I just added two versions of my face (with and without glasses) to my profile then tried a few tests. Unfortunately I still get the timeout problem, so I still have to enter my password manually.
Try upping the certainty value, howdy might be recognizing you with too little match certainty.
I upped the certainty value to 9 and lowered the dark_threshold to 1 but still got the timeout error.
I noticed that when I run the test procedure, the frame rate and exposure consistency seems to depend heavily on the distance between my face and the emitters/camera. Still, even when I added a new face based on the distance and position I felt was most consistent in the test procedure, I still get the timeout errors.
Any other suggestions?
Following up on issues i forgot to reply to, are you still having this problem or did you fix it/uninstall Howdy?
Greenish static is a new symptom for me, does this static also show up when you open Cheese (search for Cheese in the dash)? You might need to try out different webcams/video sizes in the Preferences menu.
So Cheese is also just getting the garbage data? Does switching resolutions in the preferences change anything?
Great! Could you set the frame size in sudo howdy config to that format:
This should fix the problem.
Had the same problem, running it with sudo QT_X11_NO_MITSHM=1 howdy test finally worked.
I had exactly the same issue.
I was able so see my image in test, but it never had been recognized. Also in test, using IR camera, it never shown the red circle around my face (testing with the normal camera, everything worked fine). I completely solved the issue with the steps bellow:
1 — To fix green image:
In howdy config, simply set ( no need to set force_mjpeg or anything else):
frame_width = 400
frame_height = 400
2 — To fix testing interface:
add the line to /etc/environment
QT_X11_NO_MITSHM=1
3 — Finally to get the correct detection, including the red circle in howdy test, I had to set bright and contrast the parameters in v4l:
v4l2-ctl -d /dev/video0 —set-ctrl=contrast=0
and:
v4l2-ctl -d /dev/video0 —set-ctrl=brightness=255
check with:
$ v4l2-ctl -d /dev/video0 —list-ctrls
brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=255
contrast 0x00980901 (int) : min=0 max=255 step=1 default=32 value=0
Doing this, I had no more problem with detection using IR camera.
Источник
I’m writing a simple script that should periodically change the brightness of all the screens in the system.
I figured out that for this I can use following command:
xrandr --output {display name} --brightness {float in a range [0.0,1.0]}
First I wanted to use xbacklight, but it turns out that it cannot control all the screens brightness, so I switched to xrandr.
When I run this command from the terminal it works fine, but next I tried to schedule it to a crontab to run it periodically, first it wasn’t working at all, but then I found that I need to provide $DISPLAY env
variable to cron so that the script will know where to look for X.
It seems to be working now, however not totally fine, because sometimes it gives error like this:
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 131 (XInputExtension)
Minor opcode of failed request: 57 ()
Serial number of failed request: 18
Current serial number in output stream: 19
And I cannot get why this error occurs and what to do in order to fix it?
Here’s the content of my crontab file:
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/home/user
DISPLAY=:0
XAUTHORITY=/home/user/.Xauthority
0 * * * * python3 /home/user/script.py > /home/user/scriptLog 2>&1
And the script (it runs every hour, and at first turns off the keybord and all screens for 5 minutes and then it turns them on):
#!/usr/bin/env python3
import time
import os
import sched
SEC_PER_HOUR = 60 * 60
MIN_PER_HOUR = 60
SEC_PER_MIN = 60
DEVICE_ACTIVE = 139
dur = 5
def xinput_set_prop(devices, prop, val):
for id in devices:
os.system("xinput set-prop {} --type=int --format=8 {} {}".format(id, prop, val))
def xrandr_set_brightness(devices, val):
for id in devices:
os.system("xrandr --output {} --brightness {}".format(id, val))
cur_t = time.time()
if cur_t / SEC_PER_HOUR - cur_t // SEC_PER_HOUR < dur / MIN_PER_HOUR:
keyboard_ids = [line.replace("n", "") for line in os.popen("""xinput list | sed -rn 's/.*id=//; s/s+.*slaves+keyboard.*//p'""")]
monitor_ids = [line.replace("n", "").split(" ")[-1] for line in os.popen("""xrandr --listmonitors""")]
xrandr_set_brightness(monitor_ids, 0.01)
xinput_set_prop(keyboard_ids, DEVICE_ACTIVE, 0)
run_t = cur_t // SEC_PER_HOUR * SEC_PER_HOUR + dur / MIN_PER_HOUR + dur * SEC_PER_MIN
del_t = run_t - cur_t
s = sched.scheduler(time.time, time.sleep)
s.enter(del_t, 1, xinput_set_prop, argument=(keyboard_ids, DEVICE_ACTIVE, 1))
s.enter(del_t, 1, xrandr_set_brightness, argument=(monitor_ids, 1.0))
s.run()
I’m using Ubuntu 16.04, with the Unity desktop.