파일/앱을 다시 열 때 잃어버린 사용 중인 커서를 어떻게 얻나요?

파일/앱을 다시 열 때 잃어버린 사용 중인 커서를 어떻게 얻나요?

이에 대한 버그 보고서가 있습니다.https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/862662, 최근에는 이것이 실제로 노틸러스 버그인지 아닌지 확실하지 않습니다. Precise를 설치하기 전에 PCManFM을 설치하여 파일을 열 때 대기 중에 사용 중 커서가 표시되는지 확인했지만 여전히 사용 중 커서가 표시되지 않는지 테스트했습니다.

바쁜 커서는 Oneiric과 Precise Live USB 모두에서 작동하며, Oneiric을 사용하는 초기에도 작동했습니다. 그런 다음 홈 폴더를 포맷하지 않은 채로 Precise를 설치했지만 문제가 지속됩니다. 또한 홈 폴더에 있는 구성 폴더와 파일을 제거하고(실제로는 복원이 가능하도록 폴더로 이동) 로그아웃했다가 다시 로그인해 보았으나 문제가 여전히 발생합니다(Oneiric에서는 새 폴더를 만들었습니다). 하지만 구성 문제인지 확인하려면 소용이 없습니다.)

따라서,바쁜 커서가 라이브 세션에서 작동한다는 점을 고려, 설치된 시스템에서 사용 중인 커서가 정상적으로 작동하도록 하는 방법이 있습니까(예: 일부 시스템 구성 편집)?

이것이 일반적인 문제입니까, 아니면 특정 하드웨어에서만 발생합니까?

답변1

이 버그에 대한 두 가지 가능한 해결 방법은 다음과 같습니다.

  • 설치하다"gdm" 패키지. 설치 프로그램에서 선호하는 로그인 관리자가 무엇인지 묻습니다. "lightdm" 대신 "gdm"을 선택하세요.
  • lightdm을 고수하되 로그인할 때 비밀번호를 입력할 필요가 없도록 계정을 구성하십시오. 홈 폴더가 암호화되어 있으면 운이 좋지 않습니다. 불가능합니다. 그렇지 않은 경우 시스템 설정 패널의 "사용자 계정" 섹션에서 "자동 로그인" 옵션을 활성화하십시오.

이 솔루션은 완벽하지 않습니다. GTK 애플리케이션만 실행 시 바쁜 커서를 갖게 됩니다. Qt와 VLC, Libreoffice 같은 다른 것들은 여전히 ​​그렇지 않습니다.

답변2

매우 빠르게, 또 다른 가능한 해결 방법은 다음과 같습니다.

확인하다/doc/startup-notification-devel-0.12/examples 색인그리고 얻다 test-monitor.c; 일치하도록 파일을 수정하십시오.

...
//#include <config.h>
#ifndef SN_API_NOT_YET_FROZEN
#define SN_API_NOT_YET_FROZEN
#endif
#include <libsn/sn.h>
...
int
main (int argc, char **argv)
{
  Display *xdisplay;
  SnDisplay *display;
  SnMonitorContext *context;

  setbuf (stdout, NULL);

  xdisplay = XOpenDisplay (NULL);
...

다음을 사용하여 구축:

sudo apt-get install libstartup-notification0-dev
gcc -I/usr/include/startup-notification-1.0 test-monitor.c -o test-monitor -lX11 -lstartup-notification-1

그 다음에:

$ sudo apt-get install python-osd
$ cat > osd.py <<"EOF" 
import pyosd # XOSD
import time
import sys
import os

# default_font="-*-helvetica-medium-r-normal-*-*-360-*-*-p-*-*-*"
# xlsfonts | less # to find fonts, say
# -misc-fixed-bold-r-normal--0-0-75-75-c-0-iso10646-1:
tfont="-*-fixed-bold-r-normal--*-*-100-*-c-*-*-*"
osd = pyosd.osd(font=tfont, colour='#FF0000', lines=3)
osd.set_align(pyosd.ALIGN_CENTER)
osd.set_pos(pyosd.POS_MID)
display = osd.display
osd.set_timeout(1)
# display will last as long the python program hasn't exited!
#display("Hello") 
#display(50, type=pyosd.TYPE_SLIDER, line=0) 

display("Hello from pyosd/XOSD", line=1)


# disable stdin buffering (ok on Python 2.7)
ttfo = os.fdopen(sys.stdin.fileno(), 'r', 0)

while 1:
  try:
    inline = ttfo.readline().rstrip()
  except KeyboardInterrupt:
    break
  if not inline:
    break
  print(inline)
  for ix in range(0,50):
    display(ix, type=pyosd.TYPE_PERCENT, line=0) 
    display(inline, line=1)
    display(ix, type=pyosd.TYPE_PERCENT, line=2) 
    time.sleep(0.02)
  time.sleep(1)
EOF

... 그리고 테스트:

./test-monitor | stdbuf -oL grep description | python osd.py

/etc/lightdm/lightdm.conf추가 로 session-setup-script=/path/to/mylightdm-startup.sh; 그리고 mylightdm-startup.sh`에:

SND=/path/to/folder
($SND/test-monitor | stdbuf -oL grep description | python $SND/osd.py) &

그러면 간단한 온스크린 디스플레이 알림이 표시됩니다. 또 다른 (더 복잡한) 가능성은 다음을 사용하는 것입니다.Ghosd - 투명도가 포함된 온스크린 디스플레이(OSD)(또한여기).

답변3

이 버그는 lightdm 로그인 관리자를 사용하는 경우 존재합니다. 이 버그는 lightdm, GDK3 및 Xorg의 사양에 따라 조정되었으며 자세한 내용은런치패드 버그 #1024482.

GDK_CORE_DEVICE_EVENTS이 문제를 해결하려면 GDK3가 결함이 있는 Xorg 호출을 사용하지 않도록 환경 변수를 설정해야 합니다 .

echo "GDK_CORE_DEVICE_EVENTS=true" | sudo tee ~lightdm/.pam_environment

관련 정보