linux – XMonad:dmenu在启动时没有启动/生成

前端之家收集整理的这篇文章主要介绍了linux – XMonad:dmenu在启动时没有启动/生成前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

XMonad的新手并且热爱它到目前为止.我有一个相当普通/常规的XMonad设置,我遇到dmenu问题.当我登录并点击mod时没有任何反应.如果我然后打开一个终端并点击xmonad –restart然后mod p,dmenu将会正常工作.

我的xmonad.hs一定有问题吗?我尝试了XMonad的非自定义设置,并且工作正常(即登录后dmenu正在工作).

我的问题:

>我的xmonad.hs有问题吗?
>除非我xmonad –restart,为什么dmenu不会工作?
> xmonad.start中的某些内容是否会在启动xmonad时阻止dmenu正确加载?

这是我的文件(从overthink借来的). :

xmonad.hs

import System.IO
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run(spawnPipe)
import XMonad.Hooks.ICCCMFocus

myWorkspaces = ["1","2","3","4","5","6"] 

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

main = do
  xmproc <- spawnPipe "/usr/bin/xmobar /home/aaron/.xmobarrc"
  xmonad $defaultConfig { terminal = "urxvt" }
      { manageHook = manageDocks <+> manageHook defaultConfig,startupHook = takeTopFocus >> setWMName "LG3D" -- fix for Java apps,layoutHook = avoidStruts  $ layoutHook defaultConfig,logHook = dynamicLogWithPP xmobarPP
                      { ppOutput = hPutStrLn xmproc,ppTitle = xmobarColor "green" "" . shorten 50
                      },modMask = mod4Mask     -- Rebind Mod to the Windows key,workspaces = myWorkspaces
      } `additionalKeys`
      [ ((mod4Mask .|. shiftMask,xK_l),spawn "gnome-screensaver-command --lock") ]

xmonad.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Xmonad-****
Comment=Ligthweight,pretentIoUs tiling window manager
Exec=xmonad.start
Icon=xmonad.png
Type=XSession

xmonad.start

#!/bin/bash

xrdb -merge .Xresources

trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype percent --width 10 --heighttype pixel --height 20 --transparent true --alpha 0 --tint 0x333333 &

# settings daemon is a prereq for some other gnome apps
gnome-settings-daemon &

# Network monitor (connections,vpns) applet in tray
if [ -x /usr/bin/nm-applet ] ; then
    nm-applet --sm-disable &
fi

# volume indicator in tray
if [ -x /usr/bin/gnome-sound-applet ] ; then
  gnome-sound-applet &
fi

eval $(gnome-keyring-daemon --start)
export GNOME_KEYRING_SOCKET
export GNOME_KEYRING_PID

#exec xmonad
dbus-launch --exit-with-session xmonad

谢谢你的帮助!

最佳答案
我有一种模糊的感觉,当你第一次启动xmonad时,它使用一个可执行配置,然后当你重新编译时,它会找到“正确”的配置.在xmonad.desktop中,尝试更改Exec =行以包含xmonad.start的完整路径.

Exec=/full/path/to/xmonad.start

或者您可以尝试更改xmonad.start中的最后一行以包含xmonad可执行文件的完整路径.

dbus-launch --exit-with-session /full/path/to/xmonad

另一件事是将最后两行改为:

exec xmonad
#dbus-launch --exit-with-session xmonad

如果这些选项中的任何一个改变了您所看到的行为,那么这可能会给我们一些线索.

编辑:让我们尝试一种不同的启动方式,看看我们是否可以学到任何东西.不要启动任何窗口管理器,而是登录普通终端.键入命令xinit – xmonad或xinit – / full / path / to / xmonad.

或者,创建文件.xinitrc,其中包含一行:

xmonad

然后键入命令startx.

我也在Xmonad FAQ上找到了这个,这可能会有所帮助:

2.6 not found errors or changes to xmonad.hs won’t take effect

Ensure that ghc,and the xmonad executable are both in the environment
PATH from which you start X. Alternatively symlink them to locations
already in the PATH. ghc-pkg list should show ghc,xmonad,X11,etc.
without brackets,e.g. {xmonad} is bad. ghc-pkg check will tell you if
you have inconsistent dependencies or other registration problems.

The mod-q action calls the xmonad binary to recompile itself,so if
your display manager is starting it with /path/to/xmonad you’ll also
have to edit your xmonad.hs mod-q binding to use the full path and
restart X (or in newer versions use ‘xmonad –restart’) to restart
xmonad with the new mod-q full path binding.

原文链接:https://www.f2er.com/linux/441050.html

猜你在找的Linux相关文章