Cac ban giup fix voi

8 views
Skip to first unread message

maikhai

unread,
May 21, 2016, 4:48:13 AM5/21/16
to ArchLinux Việt Nam
file xmonad.hs:
[abbey@a3che ~]$ cat .xmonad/xmonad.hs
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO

myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
]

main = do
xmproc <- spawnPipe "/path/to/xmobarbinary /home/jgoerzen/.xmobarrc"
xmonad $ defaultConfig
{ manageHook = manageDocks <+> myManageHook -- make sure to
include myManageHook definition from above
<+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, modMask = mod4Mask -- Rebind Mod to the Windows key
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command
-lock")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

[abbey@a3che ~]$ xmonad --recompile
Error detected while loading xmonad configuration file: /home/abbey/.xmonad/xmonad.hs

xmonad.hs:26:72:
lexical error in string/character literal at character '\n'

Please check the file for errors.

xmonad: xmessage: executeFile: does not exist (No such file or directory)

Tim hoai ma khong thay '\n' o cho nao? Fix loi nay ra sao? Thk.

Duc Tran

unread,
May 21, 2016, 5:42:58 AM5/21/16
to archl...@googlegroups.com

Bác ơi, chỗ dòng này bác đưa tham số "-lock" lên cùng dòng với "xscreensaver-command" đi bác


Chúc bác khỏe

mai khai

unread,
May 21, 2016, 5:58:30 AM5/21/16
to archl...@googlegroups.com
       , modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        [ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command-lock")

        , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((0, xK_Print), spawn "scrot")
        ]

sau khi re-edit, chay no thi:


[abbey@a3che ~]$ xmonad --recompile
Error detected while loading xmonad configuration file: /home/abbey/.xmonad/xmonad.hs

xmonad.hs:17:1: Not in scope: ‘include’

xmonad.hs:17:22: Not in scope: ‘definition’

xmonad.hs:17:33: Not in scope: ‘from’

xmonad.hs:17:38: Not in scope: ‘above’


Please check the file for errors.

xmonad: xmessage: executeFile: does not exist (No such file or directory)

Nhan tien hoi luon cai nay: chay "ibus-daemon -drx" nhung vi khong co cai bar nao nen khong trong thay no duoc. Lam sao he?


--
Quy tắc ứng xử: http://archlinuxvn.org/vn/rules/
Địa chỉ nhóm thư: https://groups.google.com/group/archlinuxvn
---
You received this message because you are subscribed to a topic in the Google Groups "ArchLinux Việt Nam" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/archlinuxvn/Su2Kgode2Iw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to archlinuxvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archlinuxvn/CAOQTeiJizfTvAg0EGyGkMadjO65pbkvU1DMJaAFaH0%3D0OG-HqQ%40mail.gmail.com.



--
m k h _ s g n

mai khai

unread,
May 21, 2016, 6:03:30 AM5/21/16
to archl...@googlegroups.com
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
        , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")

Lai re-edit nhu vay roi chay recompile cung that bai:


[abbey@a3che ~]$ xmonad --recompile
Error detected while loading xmonad configuration file: /home/abbey/.xmonad/xmonad.hs

xmonad.hs:17:1: Not in scope: ‘include’

xmonad.hs:17:22: Not in scope: ‘definition’

xmonad.hs:17:33: Not in scope: ‘from’

xmonad.hs:17:38: Not in scope: ‘above’

Please check the file for errors.

xmonad: xmessage: executeFile: does not exist (No such file or directory)

On Sat, May 21, 2016 at 4:42 PM, Duc Tran <901...@gmail.com> wrote:

--
Quy tắc ứng xử: http://archlinuxvn.org/vn/rules/
Địa chỉ nhóm thư: https://groups.google.com/group/archlinuxvn
---
You received this message because you are subscribed to a topic in the Google Groups "ArchLinux Việt Nam" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/archlinuxvn/Su2Kgode2Iw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to archlinuxvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archlinuxvn/CAOQTeiJizfTvAg0EGyGkMadjO65pbkvU1DMJaAFaH0%3D0OG-HqQ%40mail.gmail.com.

Duc Tran

unread,
May 21, 2016, 6:20:53 AM5/21/16
to archl...@googlegroups.com
        { manageHook = manageDocks <+> myManageHook -- make sure to

                        <+> manageHook defaultConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
Bác ơi, chỗ dòng "include myManageHook definition from above" bác cho lên cùng dùng với "make sure to" vì nó thuộc command.

Chúc bác khỏe.

mai khai

unread,
May 21, 2016, 6:38:40 AM5/21/16
to archl...@googlegroups.com
OK de minh re-edit roi chay thu coi. Trong khi cho doi, minh vao trang http://arstechnica.com/civis/viewtopic.php?f=16&t=1182092 va copy cai xmonad.hs cua no roi chay recompile thi hahaha Lan Dau Tien Chay OK!

import XMonad
import XMonad.Hooks.ManageDocks

main = xmonad defaultConfig
   {
      manageHook = manageDocks <+> manageHook defaultConfig,
      layoutHook = avoidStruts  $  layoutHook defaultConfig,
      modMask = mod4Mask
   }

Vay co le roi day se ngam cuu de (thay vi chay xmonad in xfce4) se thu voi MATE xem sao.


--
Quy tắc ứng xử: http://archlinuxvn.org/vn/rules/
Địa chỉ nhóm thư: https://groups.google.com/group/archlinuxvn
---
You received this message because you are subscribed to a topic in the Google Groups "ArchLinux Việt Nam" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/archlinuxvn/Su2Kgode2Iw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to archlinuxvn...@googlegroups.com.

mai khai

unread,
May 21, 2016, 7:26:53 AM5/21/16
to archl...@googlegroups.com
Vẫn thất bại Đức à. Chạy recompile thì nó làm ngon lành, trả về $ không kèm thông báo gì. Nhưng khi reboot vào lại thì màn hình đơ luôn. Mod+shift+enter không nhúc nhích. Mod+1,2,3,4,5,6,7,8,9 cũng vậy. Xóa .xmonad/xmonad.hs, chạy recompile với .xmonad/trống bị error.
Reboot vào lại, pacman -S xmonad xmonad-contrib rồi chạy nó nữa cũng thua luôn!
Vậy chắc là vẫn phải chạy xmonad với cái xmonad.hs default của nó (không tìm ra nó nằm chỗ nào). Đang cài Arch lại lần nữa đây hihi.

--
Quy tắc ứng xử: http://archlinuxvn.org/vn/rules/
Địa chỉ nhóm thư: https://groups.google.com/group/archlinuxvn
---
You received this message because you are subscribed to a topic in the Google Groups "ArchLinux Việt Nam" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/archlinuxvn/Su2Kgode2Iw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to archlinuxvn...@googlegroups.com.

Duc Tran

unread,
May 21, 2016, 9:30:55 AM5/21/16
to archl...@googlegroups.com
Vậy cháu cũng chịu rồi bác, đành nhờ người cao nhân hơn.

Chúc bác khỏe
You received this message because you are subscribed to the Google Groups "ArchLinux Việt Nam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archlinuxvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archlinuxvn/CAJNTmdOLddD2xUVrGpk8knyk9j%2BnxTWaacQhsG2F%3D6uwa914ag%40mail.gmail.com.


mai khai

unread,
May 21, 2016, 9:43:06 AM5/21/16
to archl...@googlegroups.com
Có khi nào là do nó 32 mà mình chạy Arch64 hay không nhỉ?
Cái xmonad này kỳ ở chỗ nếu không recompile sảng thì không sao. Nếu compile với một xmonad.hs không thích hợp thì lần chạy kế tiếp máy sẽ đơ, dù có tháo file hỏng đó ra cũng vẫn đơ luôn.
Cái hấp dẫn của nó là làm rất lẹ, gần như không phải chờ. Chỉ có FF nạp khá lâu.


mai khai

unread,
May 21, 2016, 7:09:51 PM5/21/16
to archl...@googlegroups.com
Làm rồi đây (coi attach, vì dán vào đây thì nó lại bẻ dòng).
Nếu có cái site nào nhiều xmonad_guru mà nhờ họ đọc giùm là ngon a!

2016-05-21 13:31 GMT+00:00 Duc Tran <901...@gmail.com>:
xmonad.hs_re-edit_ductran

mai khai

unread,
May 21, 2016, 10:58:13 PM5/21/16
to archl...@googlegroups.com
Tạm thời thấy giải quyết thế này là có mòi ăn tiền (chưa "dám" reboot, phải báo cáo liền kẻo khi reboot nó lại đơ như mấy lần trước):
*Cài Arch + cài xmonad rồi chạy lai rai (thư mục .xmonad/không có xmonad.hs)
*Cài thêm : # pacman -S xfce4 (nhưng không cài xfce4-session)
*Ở ~/.xinitrc cho vào 2 dòng:
xsetroot -cursor_name left_ptr
exec xmonad
Gọi xfce4-panel (có báo lỗi gì đấy nhưng mình ngó lơ)
Gọi ibus-daemon -drx từ ~/.bashrc là thấy nó. Sửa một chút, ok.
Gửi xong cái này sẽ reboot máy xem có bị đơ nữa không. Coi Attach.
Nếu nó vẫn chạy thì tốt, nhưng không hiểu tại sao.

Screenshot_2016-05-22_16-40-50.png

mai khai

unread,
May 21, 2016, 11:16:43 PM5/21/16
to archl...@googlegroups.com
Đức ơi boot máy rồi, xmonad vẫn ngon lành cành mai. Thôi cạch không dám ngọ nguậy cái xmonad.hs nữa.
Reply all
Reply to author
Forward
0 new messages